Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas
Created by Guest
Created on Oct 29, 2022

mongodbatlas_database_connection

A resource that creates a connection for a database. ``` resource "mongodbatlas_database_connection" "connection" { database = "test" # Name of database connection_type = "Standard" # or Private Endpoint database_user = "test" # Name of DB_USER method = "shell" # other options "application | compass | vscode" # For Standard Connection ip = "accessAnywhere" # or other IP Address # For Private Endpoint endpoint = "" # ID of Private Endpoint } ``` OUTPUT ARGUMENTS - id - connection_string
  • Attach files
  • Guest
    Nov 17, 2022
    Hi Mack, thanks for feedback! Can you share more about use cases for having a dedicated connection resource? When creating an Atlas Cluster in Terraform, most users simply Output their connection strings directly to terminal. See here to learn more if helpful (see step 12): https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-terraform-aws/