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 Completed
Categories Atlas
Created by Guest
Created on Mar 24, 2023

Make optimized connection strings available from api

When creating a cluster that has Optimized Connection Strings as documented here: https://www.mongodb.com/docs/atlas/connect-to-database-deployment/#improve-connection-performance-for-sharded-clusters-behind-a-private-endpoint, those connection strings do not appear to be available through the Atlas API, and thus not available through the Terraform provider. Since legacy connection strings are not the default anymore, it would be important to make those optimized strings available through API and Terraform. In addition it would be nice to be able to get the legacy connection strings for old drivers even if the cluster qualifies for optimized connection strings. Those legacy connection strings are simply not populated unless the cluster was initially a replicaset or Mongo support intervenes.
  • ADMIN RESPONSE
    Aug 1, 2025
    this feature has been released as part of v1.10.0. thank you for the feedback. for more details see: https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster#connection_strings.private_endpoint.#.srv_shard_optimized_connection_string ( https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster#connection_strings.private_endpoint.%23.srv_shard_optimized_connection_string )
  • Attach files
  • Guest
    Mar 29, 2023
    Hi Benoit, can you try cURL command GET https://cloud.mongodb.com/api/atlas/v1.5/groups/{groupId}/clusters/{clusterName}? Addition details here: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Multi-Cloud-Clusters/operation/getCluster There are several connection strings details included in response back which may be able to help. In the interim we are working to get this enabled in Terraform as well and should be part of the v1.9.0 release (1-2 months away).