{
"properties": {
"displayName": "Enforce managedBy property for resource groups",
"policyType": "Custom",
"mode": "All",
"parameters": {},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/resourceGroups"
},
"then": {
"effect": "audit",
"details": {
"type": "Microsoft.Resources/resourceGroups/managedBy"
}
}
}
}
}
azure policy to check managedby property of resource group
Dharmaraj
0
Reputation points
hi,
i m trying to create azure policy to make sure the mangedby property is set when creating resources group using terraform.
{ "field": "type", "equals": "Microsoft.Resources/resourceGroups/managedBy" }
but this property does not have an alias to use it in policy.
is there any way i can make this policy work
1 answer
Sort by: Most helpful
-
Theophilus Sawyerr 0 Reputation points
2024-05-06T14:24:00.9866667+00:00