An administrator manages an Azure environment with a Management Group named Tenant-MG. Under Tenant-MG, there is a Subscription named Sub-01 containing a Resource Group named RG-01. A policy definition is created to prevent users from deploying virtual machines of a specific SKU size. The policy must block any deployment attempt that violates this rule within the Resource Group. Which Azure Policy effect should be used in the policy definition to block the deployment of non-compliant virtual machines?
- DenyAnswer
- BAudit
- CDeployIfNotExists
- DDisabled
Answer
Deny
The Deny effect prevents resource creation or modification requests that do not comply with the policy definition. In this scenario, it immediately blocks the deployment of virtual machines of the restricted SKU size.
Step-by-Step Solution
Key Concept
Azure Policy effects determine what happens when a resource is evaluated against a policy rule during deployment or modification.