The mongoUri output of the cluster is not returning the expected value.
The documentation states "Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster."
However .mongoUri returns a list (delineated by commas) of connection strings for each shard in the cluster.
The .srvAddress output returns the uri in the expected format.
Steps to reproduce
Create or import a cluster. Access the mongoUri output.
Expected Behavior
We expected a single connection string to the cluster itself. Not each shard in the cluster.
Actual Behavior
A comma delineated list of connection strings to each shard in the cluster.
Versions used
CLI
Version 3.36.0
Go Version go1.17.12
Go Compiler gc
Plugins
NAME VERSION
nodejs unknown
Host
OS Microsoft Windows 11 Home
Version 10.0.22000 Build 22000
Arch x86_64
This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v16.13.2'
Current Stack: zerotech/prod
TYPE URN
pulumi:pulumi:Stack urn:pulumi:prod::cpt-infrastructure::pulumi:pulumi:Stack::cpt-infrastructure-prod
pulumi:providers:mongodbatlas urn:pulumi:prod::cpt-infrastructure::pulumi:providers:mongodbatlas::cptmongo
pulumi:providers:random urn:pulumi:prod::cpt-infrastructure::pulumi:providers:random::default_4_8_0
mongodbatlas:index/project:Project urn:pulumi:prod::cpt-infrastructure::mongodbatlas:index/project:Project::infrastructure-atlas
random:index/randomString:RandomString urn:pulumi:prod::cpt-infrastructure::random:index/randomString:RandomString::datastore-v2-rinkeby-aggregator-sa-name
random:index/randomString:RandomString urn:pulumi:prod::cpt-infrastructure::random:index/randomString:RandomString::datastore-v2-api-sa-name
random:index/randomString:RandomString urn:pulumi:prod::cpt-infrastructure::random:index/randomString:RandomString::datastore-v2-aggregator-sa-name
mongodbatlas:index/cluster:Cluster urn:pulumi:prod::cpt-infrastructure::mongodbatlas:index/cluster:Cluster::datastore-prod
mongodbatlas:index/cluster:Cluster urn:pulumi:prod::cpt-infrastructure::mongodbatlas:index/cluster:Cluster::datastore-dev
mongodbatlas:index/databaseUser:DatabaseUser urn:pulumi:prod::cpt-infrastructure::mongodbatlas:index/databaseUser:DatabaseUser::datastore-db-user-pl
pulumi:providers:azure-native urn:pulumi:prod::cpt-infrastructure::pulumi:providers:azure-native::default_1_66_0
random:index/randomString:RandomString urn:pulumi:prod::cpt-infrastructure::random:index/randomString:RandomString::datastore-v2-rinkeby-api-sa-name
azure-native:resources:ResourceGroup urn:pulumi:prod::cpt-infrastructure::azure-native:resources:ResourceGroup::datastore-v2-datastore-rg
azure-native:resources:ResourceGroup urn:pulumi:prod::cpt-infrastructure::azure-native:resources:ResourceGroup::datastore-v2-rinkeby-datastore-rg
azure-native:resources:ResourceGroup urn:pulumi:prod::cpt-infrastructure::azure-native:resources:ResourceGroup::cpt-global
azure-native:storage:StorageAccount urn:pulumi:prod::cpt-infrastructure::azure-native:storage:StorageAccount::datastore-v2-api-sa
azure-native:storage:StorageAccount urn:pulumi:prod::cpt-infrastructure::azure-native:storage:StorageAccount::datastore-v2-rinkeby-api-sa
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-api-appi
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-aggregator-appi
azure-native:operationalinsights:Workspace urn:pulumi:prod::cpt-infrastructure::azure-native:operationalinsights:Workspace::datastore-v2-eventlistener-loganalytics
azure-native:web:AppServicePlan urn:pulumi:prod::cpt-infrastructure::azure-native:web:AppServicePlan::datastore-v2-api-asp
azure-native:web:AppServicePlan urn:pulumi:prod::cpt-infrastructure::azure-native:web:AppServicePlan::datastore-v2-rinkeby-api-asp
azure-native:operationalinsights:Workspace urn:pulumi:prod::cpt-infrastructure::azure-native:operationalinsights:Workspace::datastore-v2-rinkeby-aggregator-loganalytics
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-rinkeby-api-appi
azure-native:operationalinsights:Workspace urn:pulumi:prod::cpt-infrastructure::azure-native:operationalinsights:Workspace::datastore-v2-rinkeby-eventlistener-loganalytics
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-listener-appi
azure-native:eventhub:Namespace urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:Namespace::datastore-v2-eventhubnamespace
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-rinkeby-aggregator-appi
azure-native:storage:StorageAccount urn:pulumi:prod::cpt-infrastructure::azure-native:storage:StorageAccount::datastore-v2-aggregator-sa
azure-native:insights:Component urn:pulumi:prod::cpt-infrastructure::azure-native:insights:Component::datastore-v2-rinkeby-listener-appi
azure-native:storage:StorageAccount urn:pulumi:prod::cpt-infrastructure::azure-native:storage:StorageAccount::datastore-v2-rinkeby-aggregator-sa
azure-native:eventhub:Namespace urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:Namespace::datastore-v2-rinkeby-eventhubnamespace
azure-native:operationalinsights:Workspace urn:pulumi:prod::cpt-infrastructure::azure-native:operationalinsights:Workspace::datastore-v2-aggregator-loganalytics
azure-native:containerregistry:Registry urn:pulumi:prod::cpt-infrastructure::azure-native:containerregistry:Registry::zer0cptcontainers
azure-native:eventhub:NamespaceAuthorizationRule urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:NamespaceAuthorizationRule::datastore-v2-rinkeby-aggregator-read
azure-native:eventhub:NamespaceAuthorizationRule urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:NamespaceAuthorizationRule::datastore-v2-rinkeby-eventlistener-write
azure-native:eventhub:EventHub urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:EventHub::datastore-v2-eventhub
azure-native:eventhub:EventHub urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:EventHub::datastore-v2-rinkeby-eventhub
azure-native:storage:BlobContainer urn:pulumi:prod::cpt-infrastructure::azure-native:storage:BlobContainer::datastore-v2-rinkeby-aggregator-sa-checkpoint
azure-native:storage:BlobContainer urn:pulumi:prod::cpt-infrastructure::azure-native:storage:BlobContainer::datastore-v2-aggregator-sa-checkpoint
azure-native:eventhub:NamespaceAuthorizationRule urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:NamespaceAuthorizationRule::datastore-v2-eventlistener-write
azure-native:eventhub:NamespaceAuthorizationRule urn:pulumi:prod::cpt-infrastructure::azure-native:eventhub:NamespaceAuthorizationRule::datastore-v2-aggregator-read
azure-native:web:WebApp urn:pulumi:prod::cpt-infrastructure::azure-native:web:WebApp::datastore-v2-rinkeby-api-fa
azure-native:web:WebApp urn:pulumi:prod::cpt-infrastructure::azure-native:web:WebApp::datastore-v2-api-fa
azure-native:containerinstance:ContainerGroup urn:pulumi:prod::cpt-infrastructure::azure-native:containerinstance:ContainerGroup::datastore-v2-rinkeby-aggregator-container
azure-native:containerinstance:ContainerGroup urn:pulumi:prod::cpt-infrastructure::azure-native:containerinstance:ContainerGroup::datastore-v2-aggregator-container
azure-native:containerinstance:ContainerGroup urn:pulumi:prod::cpt-infrastructure::azure-native:containerinstance:ContainerGroup::datastore-v2-eventlistener-container
azure-native:containerinstance:ContainerGroup urn:pulumi:prod::cpt-infrastructure::azure-native:containerinstance:ContainerGroup::datastore-v2-rinkeby-eventlistener-container
Found no pending operations associated with zerotech/prod
Backend
Name pulumi.com
URL https://app.pulumi.com/ryancrosszero
User ryancrosszero
Organizations ryancrosszero, zerotech
Pulumi locates its logs in C:\Users\ryanc\AppData\Local\Temp by default
Additional context
srvAddress gives the proper uri.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
What happened?
https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/cluster/#mongouri_nodejs
The
mongoUri
output of the cluster is not returning the expected value.The documentation states "Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster."
However
.mongoUri
returns a list (delineated by commas) of connection strings for each shard in the cluster.The
.srvAddress
output returns the uri in the expected format.Steps to reproduce
Create or import a cluster. Access the
mongoUri
output.Expected Behavior
We expected a single connection string to the cluster itself. Not each shard in the cluster.
Actual Behavior
A comma delineated list of connection strings to each shard in the cluster.
Versions used
Additional context
srvAddress
gives the proper uri.Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).