Question

Difficulty: EasyAzure Policy Governance

An organization is designing a governance strategy for Azure resources. You need to recommend Azure Policy configurations to meet the following requirements:

* Block the deployment of any virtual machine that does not use an approved SKU.
* Automatically deploy a diagnostics extension if a virtual machine is created without one.

Which two Azure Policy effects should you recommend?

  1. DenyAnswer
  2. DeployIfNotExistsAnswer
  3. C
    Audit
  4. D
    Modify

Answer

The correct policy effects are Deny and DeployIfNotExists.
The correct policy effects are Deny and DeployIfNotExists. The Deny effect blocks the creation of resources that violate the policy rules, making it perfect for enforcing SKU restrictions. The DeployIfNotExists effect evaluates the resource configuration and, if a specified child resource (such as a diagnostics extension) is missing, deploys the resource via an ARM template deployment.

Step-by-Step Solution

1
Analyze the first requirement: Block the deployment of virtual machines with non-approved SKUs.
The Deny policy effect is identified as the correct mechanism because it proactively blocks the creation or update of resources that violate the defined policy rules.
Preventing the creation of non-compliant resources is the primary use case for the Deny effect.
2
Analyze the second requirement: Automatically deploy a diagnostics extension if a virtual machine is missing one.
The DeployIfNotExists policy effect is identified as the correct mechanism because it checks for the existence of a child resource or related resource, and if not present, triggers a template deployment to remediate it.
DeployIfNotExists is designed for deploying resources and configurations that must exist on target resources.
3
Evaluate the distractors (Audit and Modify effects) against the requirements.
Confirm that Audit only logs non-compliance without action, and Modify only updates resource properties/tags but cannot deploy sub-resources.
This confirms that the selected correct effects are the only ones meeting both business objectives.

Key Concept

Azure Policy effects determine how resources are evaluated and remediated to maintain governance standards.
Estimated Time:1m 0s
Rate this question