Your company requires that all new resource groups deployed to a production subscription must include a tag named 'CostCenter'. If an administrator attempts to create a resource group without this tag, Azure must immediately block the creation process. Which Azure Policy effect should you specify in the policy definition to meet this requirement?
- DenyAnswer
- BAudit
- CDeployIfNotExists
- DModify
Answer
Deny
The correct answer is the option specifying the Deny effect. In Azure Policy, the Deny effect is designed to block any resource creation or update request that does not comply with the policy definition, ensuring immediate enforcement of compliance boundaries at the time of deployment.
Step-by-Step Solution
Key Concept
Azure Policy effects determine how Azure responds when a resource is evaluated against a policy rule. To prevent deployment of non-compliant resources, the Deny effect is used.