Is there an example/walkthrough on how to assign a Policy to resource groups that are tagged as production. #107
Unanswered
ashokkumarraya
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hi gettek, Do you have any solution here? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ashokkumarraya, apologies for the late reply... To simplify assignment try adding tagging conditions to the Policy rule as in the example below. This will allow you to define and assign the policy at a high level e.g. Management Group. "policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Resources/subscriptions/resourceGroups"
},
{
"field": "[concat('tags[', parameters('tagName'), ']')]",
"equals": "Production"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi gettek,
we have to assign the policies to particular resource groups that are tagged as production, can you please guide me on how to do this?
Beta Was this translation helpful? Give feedback.
All reactions