Forum Discussion
abovethekloud
Aug 22, 2019Copper Contributor
Azure Blueprint: Allow resource only in specifc resource group
Hello all, We would like to use blueprint to govern azure subscriptions. Within the blueprint we would like to deploy some kind of "core networking" resource group containing a VNET, which we can...
camarvin
Sep 28, 2019Copper Contributor
For the policy, check out the https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#value and the resourcegroup() function.
Something like (not tested):
{
"if": {
"allOf": [
{
"field": "type",
"like": "Microsoft.Network/*"
},
{
"value": "[resourceGroup().name]",
"notEquals": "CoreNetworking"
}
]
},
"then": {
"effect": "deny"
}
}