Open royberris opened 4 months ago
After looking through issues I found https://github.com/Azure/bicep-types-az/issues/2043
Correct configuration is as following:
resource dedicatedGateway 'services' = if (enableDedicatedGateway) {
name: 'SqlDedicatedGateway'
properties: {
instanceCount: 1
instanceSize: 'Cosmos.D4s'
serviceType: 'SqlDedicatedGateway'
}
}
For Cosmos DB Dedicated Gateway the name has to be SqlDedicatedGateway
and a property named serviceType
needs to be set to SqlDedicatedGateway
. This is not documented anywhere and bicep doesn't recognize the serviceType
.
I'm keeping this issue open because bicep should recognize a problem here and warn me about it.
Tagging @markjbrown - any documentation we can update or swagger enums we can add to reduce friction here?
Thanks @alex-frankel. Will take up with the team. We will revert on this soon. Thanks.
@royberris the serviceType options have been updated in the documentation: https://learn.microsoft.com/en-us/rest/api/cosmos-db-resource-provider/service/create?view=rest-cosmos-db-resource-provider-2024-05-15-preview&tabs=HTTP
@alex-frankel , this has been fixed. Feel free to close this issue.
Thanks!
Bicep version Bicep CLI version 0.27.1 (4b41cb6d4b)
Describe the bug When trying to create a
services
child resource onMicrosoft.DocumentDB/databaseAccounts@2024-02-15-preview
it gives me the error that the payload cannot be parsed.https://learn.microsoft.com/en-us/azure/templates/microsoft.documentdb/2024-02-15-preview/databaseaccounts/services?pivots=deployment-language-bicep#resource-format
To Reproduce
Additional context
This is being deployed to an existing cosmos db that does not yet have a dedicated gateway.
Error from Azure Portal deployments on the resource group: