While trying to setup cosmosdb with default_identity_type as UserAssignedIdentity not working as expected.
Getting error like → Code=“BadRequest” Message="Database account creation failed. Operation Id: 9ead9225-XXXXXXXXXfdb1383cfa, Error : Updating default identity not allowed. Cannot set default identity to UserAssigned because the account doesn’t have any UserAssigned identities.
But we don’t have the provision to create user assigned identity for cosmos account via terraform, in the Identity block it’s mentioned that
identity block supports the following:
type- (Required) Specifies the type of Managed Service Identity that should be configured on this Cosmos Account. Possible value is only
But in default_identity_type we have the option to start with UserAssignedIdentity, how we can enable this to use an existing managed identity
default_identity_type- (Optional) The default identity for accessing Key Vault. Possible values are
SystemAssignedIdentityor start with
UserAssignedIdentity. Defaults to