An organization wants to restrict the deployment of specific virtual machine sizes in a test resource group. If an administrator attempts to deploy a virtual machine with a size that is not on the allowed list, the deployment must be immediately blocked. Which Azure Policy effect should you recommend to meet this requirement?
- DenyAnswer
- BAudit
- CDeployIfNotExists
- DModify
Answer
Deny
The correct option is Deny. The Deny effect is used to block resource requests that do not comply with the policy definition, preventing the deployment from succeeding in the first place.
Step-by-Step Solution
Key Concept
Azure Policy Effects for Compliance Enforcement
Estimated Time:45s