How can an Azure policy assess SQL Azure database capacity?
Russell H. DeGrove
6
Reputation points
I have a parameter
"maxCores": {
"type": "Integer",
"metadata": {
"displayName": "Max Capacity",
"description": "The max cores or DTUs that can be specified for Sql Azure."
},
"defaultValue": 4
}
but it never seems to fail this check
{
"not": {
"field": "Microsoft.Sql/servers/databases/currentSku.capacity",
"lessOrEquals": "[parameters('maxCores')]"
}
}
I have also tried
{
"not": {
"field": "Microsoft.Sql/servers/databases/sku.capacity",
"lessOrEquals": "[parameters('maxCores')]"
}
}
I am able to check
{
"field": "Microsoft.Sql/servers/databases/sku.tier",
"notEquals": "[parameters('allowedTier')]"
},
so why am I having trouble with sku capacity?