A company assigns an Azure Policy definition that restricts the deployment of virtual machines to specific allowed sizes. A developer attempts to deploy a virtual machine size that is not in the allowed list. What occurs when the developer attempts this deployment?
- The deployment is blocked, and the virtual machine is not created.Answer
- BThe deployment succeeds, but the developer's Azure Role-Based Access Control (RBAC) permissions are automatically removed.
- CThe deployment succeeds, but the virtual machine is automatically deleted during the next compliance scan.
- DThe deployment succeeds, but the virtual machine is automatically resized to the nearest allowed size.
Answer
The deployment is blocked, and the virtual machine is not created.
The correct option states that the deployment is blocked, and the virtual machine is not created. When a policy restricts resource configurations (such as VM sizes) and a user attempts to deploy a resource that violates these rules, Azure Resource Manager (ARM) blocks the deployment request immediately, preventing the resource from being provisioned.
Step-by-Step Solution
Key Concept
Azure Policy deployment enforcement and compliance checks
Estimated Time:45s