An organization manages its Azure environment using a management group named Tenant-MG, which contains an Azure subscription named Sub-01. Sub-01 contains two resource groups named RG-Prod and RG-Dev.
You assign an Azure Policy definition that restricts allowed virtual machine SKUs at the Sub-01 subscription level. You add the RG-Dev resource group to the exclusion list of this policy assignment. A developer attempts to deploy a virtual machine with a disallowed SKU to the RG-Dev resource group.
What is the outcome of this deployment?
- The deployment succeeds because the exclusion at the resource group level prevents the policy from being applied to resources within RG-Dev.Cevap
- BThe deployment is blocked because the Deny effect is evaluated at the subscription level before resource group exclusions are processed.
- CThe deployment succeeds, but the resource group is evaluated as non-compliant and is automatically set to a Disabled state.
- DThe deployment is blocked because exclusions can only disable policy evaluation for Audit or Append effects, not Deny effects.
Cevap
The deployment succeeds because the exclusion at the resource group level prevents the policy from being applied to resources within RG-Dev.
The deployment succeeds because policy exclusions allow you to exempt specific resource groups or resources from a policy assignment. Since the assignment is excluded from RG-Dev, any virtual machines deployed inside RG-Dev are not evaluated against this policy, allowing the VM to be deployed even with a disallowed SKU.
Adım Adım Çözüm
Anahtar Kavram
Azure Policy assignment scopes and exclusions