Question

Difficulty: EasyAzure Policy Governance

An organization needs to enforce a governance requirement where all newly created virtual machines must be automatically registered with Azure Backup using a specific Recovery Services vault. If a virtual machine is deployed without backup configuration, Azure must automatically deploy the required backup extension and protection settings. Which Azure Policy effect should you use to design this solution?

  1. DeployIfNotExistsAnswer
  2. B
    Deny
  3. C
    Audit
  4. D
    Modify

Answer

DeployIfNotExists
DeployIfNotExists allows you to automatically deploy resources or configurations (like backup extensions) using an Azure Resource Manager (ARM) template when the primary resource (the virtual machine) is deployed without them. This meets the automated configuration requirement.

Step-by-Step Solution

1
Analyze the business requirement.
The requirement is to automatically deploy backup configurations (secondary resources) when a virtual machine is created without them.
This establishes that we need a policy effect capable of executing resource templates rather than just auditing or blocking deployment.
2
Evaluate the capabilities of the available policy effects.
DeployIfNotExists runs a deployment if the targeted sub-resource does not exist, whereas Modify only changes properties/tags, and Deny blocks the resource.
This step ensures that the policy effect matches the exact technical mechanism required for automated extension deployment.

Key Concept

Azure Policy Effects
Estimated Time:45s
Rate this question