azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[DocDB] MongoDB connection string should be displayed after creating a MongoDB instance

Open lostintangent opened this issue 9 years ago • 4 comments

After running az documentdb create --kind MongoDB, the following info is displayed:

DatabaseAccountOfferType    DocumentEndpoint                          Kind     Location    Name     ProvisioningState    ResourceGroup
--------------------------  ----------------------------------------  -------  ----------  -------  -------------------  ---------------
Standard                    https://<NAME>.documents.azure.com:443/  MongoDB  West US     <NAME>  Succeeded            <GROUP>

It would be ideal if this info presented the MongoDB connection string, which is what would be immediately valuable for the user, as opposed to the *.documents.azure.com URL.

lostintangent avatar Feb 02 '17 20:02 lostintangent

Aside from displaying this value immediately altering creating a MongoDB/DocDB instance, I'm not even sure whether you can acquire the MongoDB connection string via the Azure CLI right now. The list command doesn't seem to display it (even when looking at the JSON output), and I can't get the show command to work, so I don't know if it's available there.

Being able to grab this value is critical for completing the basic E2E of managing DocDB/MongoDB instances with the CLI.

lostintangent avatar Feb 22 '17 16:02 lostintangent

@dmakwana Any updates here? Now that the MongoDB support is GA, it would be great to be able to provision an instance from the CLI and retrieve the right connection string, without needing to resort to using the portal.

lostintangent avatar Mar 18 '17 22:03 lostintangent

Addressed in the PR #2580

dmakwana avatar Mar 22 '17 16:03 dmakwana

This was addressed by adding the list-connection-strings command. As explained in #2661 we are not going to provide the keys in the show or create command to remain consistent.

shurd avatar Jun 06 '19 16:06 shurd