Ideally I would like to be able to create a script like a .azcli which I could run locally against the CosmosDB emulator and then use the same script in my devops pipeline to upsert resources to Azure.
Here is my current CLI commands.
deploy-cosmos.azcli
az cosmosdb sql database create --name MyDb
--throughput 400
# This is not correct -> --account-nameAccountEndpoint=https://localhost:8081/
--resource-group my-rg
az cosmosdb collection create --collection-name Users
--db-name MyDb
[--default-ttl]
[--indexing-policy]
[--key]
[--name]
[--partition-key-path]
[--resource-group-name]
[--subscription]
[--throughput]
[--url-connection]
I can't find any mentions of the CosmosDB emulator in the Azure CLI docs and none of the parameters on the CLI commands themselves seem to be able to directly point to the emulator.
https://docs.microsoft.com/en-us/cli/azure/cosmosdb/collection?view=azure-cli-latest
I also haven't had any luck on google either.
I know I can interact with the emulator in c# to do the deployment but I was hoping I could use the CLI since I would prefer to use the same deployment process for my dev environment and test/production environment.