Soru

Zorluk: KolayAzure Policy Governance

Your company has an Azure environment with a single subscription. You are designing an Azure Policy strategy to enforce the following governance and compliance requirements:
- Prevent the deployment of resources that do not have a required 'CostCenter' tag.
- Automatically deploy a diagnostic settings extension to new virtual machines to ensure monitoring compliance.

Which two Azure Policy effects should you use to meet these requirements? (Select two.)

  1. DenyCevap
  2. DeployIfNotExistsCevap
  3. C
    Audit
  4. D
    Modify

Cevap

Use the Deny effect to prevent resource creation without the required tag, and the DeployIfNotExists effect to automatically deploy the diagnostic settings extension to virtual machines.
To satisfy the governance requirements, the Deny effect is used to block resource deployment when the required tag is missing. The DeployIfNotExists effect is used to deploy a template or resource extension (like diagnostics settings) when a resource is created, providing automated remediation without manual intervention.

Adım Adım Çözüm

1
Analyze the requirement to prevent the creation of non-compliant resources.
Identify that the Deny effect is the correct mechanism to block resource deployment when conditions (such as a missing tag) are not met.
This directly matches the requirement to prevent creation of resources without a 'CostCenter' tag.
2
Analyze the requirement to automatically deploy an extension to virtual machines upon creation.
Identify that the DeployIfNotExists effect is used to deploy nested resources or templates when the target resource is created.
This satisfies the requirement to ensure virtual machines are deployed with the diagnostic settings extension automatically.

Anahtar Kavram

Azure Policy effects determine what happens when a policy rule is evaluated during resource creation or modification.
Bu soruyu puanla