How to set shared throughput when using API for Table [CosmosDb] using infra-as-code

Wesley van Schaijk 0 Reputation points
2025-07-24T10:31:21.54+00:00

I am not able to setup my CosmosDb account level througput as code with bicep. It is not available as stated here: https://learn.microsoft.com/en-us/azure/cosmos-db/table/manage-with-bicep

Image To be honest, this isn't a tip but a missing implementation.

It is impossible to create a CosmosDb account with tables without manual intervention. And you can only set the shared throughput as long no table was created yet.

Please guide me how to configure a CosmosDb Account for shared throughput without manual intervention.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
{count} votes

1 answer

Sort by: Most helpful
  1. Mark Brown - MSFT 2,771 Reputation points Microsoft Employee Moderator
    2025-08-04T12:29:11.51+00:00

    Migrating between dedicated and shared throughput in Cosmos cannot be done with Bicep or ARM templates. It can only be done using PowerShell, CLI, Azure Management SDK or REST API.

    Here is Azure CLI command as an example.

    https://learn.microsoft.com/en-us/cli/azure/cosmosdb/table/throughput?view=azure-cli-latest#az-cosmosdb-table-throughput-migrate


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.