-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Problem Statement
Currently, the Azure CLI only supports commands for "Azure Cosmos DB accounts" (such as az cosmosdb mongodb database create -a my-account -g my-rg -n some-db-name). However, when attempting to use the same commands for Azure Cosmos DB for MongoDB (vCore) clusters, I receive the following error:
cli.azure.cli.core.azclierror: (ResourceNotFound)
Additional Information
- I have admin permissions for the resource.
- The cluster exists and is correctly configured.
- I am in the correct subscription.
Despite these factors, the CLI commands do not work for a MongoDB vCore cluster, which limits my ability to automate tasks like database creation and document uploads in a CI/CD pipeline.
Requested Solution
It would be incredibly useful to extend the CLI to support the following actions for Azure Cosmos DB for MongoDB (vCore) clusters:
- Create databases
- Delete databases
- List databases
- Upload documents
- Other MongoDB-related management tasks
By adding support for these commands, it would enable seamless integration with Azure DevOps or other automation pipelines that require database management functionality.
Considered Alternatives
While it is possible to use mongosh to manually create databases and documents, this is not practical for a CI/CD pipeline, especially one where the pipeline itself does not have direct access to the database, but only to the resource in the Azure portal.
Context for the Request
I’m currently working on a pipeline that interacts with the resource in the portal, but the lack of CLI support for MongoDB (vCore) is a roadblock. Without the ability to automate tasks such as database creation, it becomes much harder to integrate MongoDB operations within our existing infrastructure.