You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New containers or databases cannot be created with the cosmos client despite the user having permissions to do so.
This is the case both
when logging in with a DefaultAzureCredential() for a user that has permissions to create a container via the azure portal
when specifying a COSMOSDB_KEY
This bug can be reproduced with the following code:
fromappimportcosmos_clientclient=cosmos_client()
# databases cannot be createddb_name="db"db=client.create_database(db_name)
# if a database is created via the azure portal, a container cannot be created within itcontainer_name="cont"database_client=client.get_database_client(db_name)
database_client.create_container(id=container_name, partition_key="/Id")
The text was updated successfully, but these errors were encountered:
Looks like this is expected behaviour, as the cosmos client with RBAC is only to read/write data and not for resource provisioning - including database or container creation
Is it then simplest to make it part of the terraform/ initial provisioning process when the seedlings are initially made? Give app developers a single prescribed database and container that is then used for all state storage?
New containers or databases cannot be created with the cosmos client despite the user having permissions to do so.
This is the case both
DefaultAzureCredential()
for a user that has permissions to create a container via the azure portalCOSMOSDB_KEY
This bug can be reproduced with the following code:
The text was updated successfully, but these errors were encountered: