Question

Difficulty: EasyAzure Policy

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?

  1. The deployment is blocked, and the virtual machine is not created.Answer
  2. B
    The deployment succeeds, but the developer's Azure Role-Based Access Control (RBAC) permissions are automatically removed.
  3. C
    The deployment succeeds, but the virtual machine is automatically deleted during the next compliance scan.
  4. D
    The 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

1
Analyze the policy constraint and the user's action.
The policy restricts virtual machine sizes, and the user is attempting to deploy an unapproved size.
To determine the enforcement outcome, we must look at how Azure Policy evaluates new resource creation requests.
2
Determine the enforcement behavior of Azure Policy for new resources.
Azure Policy intercepts the deployment request during the Azure Resource Manager (ARM) evaluation phase.
Azure Policy acts as a gatekeeper during resource provisioning, evaluating properties before resources are deployed.
3
Identify the resulting action on the deployment.
The deployment is blocked, and the resource creation is prevented.
Since the resource properties violate the policy rule, the request is rejected and no resource is created.

Key Concept

Azure Policy deployment enforcement and compliance checks
Estimated Time:45s
Rate this question