HOTSPOT - Your company has an Azure subscription. The company requires that all resource groups in the subscription have a tag named organization set to a value...


Microsoft AZ-400 Exam

Questions Number: 167 out of 535 Questions
31.21%

Question 167
HOTSPOT -
Your company has an Azure subscription.
The company requires that all resource groups in the subscription have a tag named organization set to a value of Contoso.
You need to implement a policy to meet the tagging requirement.
How should you complete the policy? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
AZ-400_167Q.png related to the Microsoft AZ-400 Exam



Box 1: " Microsoft.Resources/subscriptions/resourceGroups"
Box 2: "Deny",
Sample - Enforce tag and its value on resource groups
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Resources/subscriptions/resourceGroups"
},
{
"not": {
"field": "[concat('tags[',parameters('tagName'), ']')]",
"equals": "[parameters('tagValue')]"
}
}
]
},
"then": {
"effect": "deny"
}
}
}
}
Reference:
https://docs.microsoft.com/en-us/azure/governance/policy/samples/enforce-tag-on-resource-groups





Previous Questions Next Questions