Closed CharlieDigital closed 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @shurd, @anfeldma-ms.
Author: | CharlieDigital |
---|---|
Assignees: | - |
Labels: | `Cosmos`, `Service Attention` |
Milestone: | - |
cosmosdb
The CosmosDB emulator emulates our data plane. CLI is a tool which exposes Control Plane operations. Today emulator doesn't emulate Control Plane features, hence your ask is not feasible.
The deprecated CLI commands which take connection string as input, they did not go through control Plane, which is also the reason they are now deprecated.
I hope this makes sense, let me know if you have any more questions.
@MehaKaushik I understand your point, but consider that the az storage queue create
operation still retains the --connection-string
parameter which allows the usage of "UseDevelopmentStorage=true"
to connect to the local emulator instance.
While I understand the desire for architectural purity, the CLI loses utility by disconnecting it from the emulator.
Is there no compromise available to the CLI team to support usage for local development?
If there is no compromise available, then the question is what is the alternative for automating/scripting against the local emulator instance? I think this is an important question to ask for teams that are using these commands in scripts to set up a local development environment consistently.
I understand your point, this is very valuable feedback. I will work with my team to see how and when can we can support this. Unfortunately, I do not have any temporary workaround.
For scripting against local emulator you can use our data plane sdk. You can use the sdk here: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sdk-dotnet-standard
or the REST APIs defined here: https://docs.microsoft.com/en-us/rest/api/cosmos-db/
@MehaKaushik I appreciate the links to the SDK and REST APIs, but for local development, they are simply not a suitable replacement for initializing and resetting the local environments as it requires writing code as opposed to writing commands.
Look forward to see how the CLI team can make this work as it streamlines the configuration of local development environments via simple batch scripts.
The documentation for the
az cosmosdb sql
commands does not seem to include any ability to interact with the local emulator instance.The earlier command
az cosmosdb database
command permitted the use of the--key
and--url-connection
parameter to interact with the local emulator instance.Is there an equivalent set of parameters/configuration for interacting with local resources?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.