Bitzu

AZ-305 ยท Governance and compliance design

Azure Policy and initiatives

Policy definitions, initiatives, assignment scope and exclusions, effects (deny, audit, append, modify, deployIfNotExists, auditIfNotExists), remediation tasks, exemptions.

Key points

  • Definition: rule plus one effect; initiative: bundled definitions.
  • deny blocks; audit allows and flags; append, modify change the request.
  • auditIfNotExists, deployIfNotExists: check or deploy a related resource after provider success.
  • Remediation tasks: modify, deployIfNotExists on existing resources (managed identity).
  • Exemption (Waiver or Mitigated, optional expiry): shown as Exempt.
  • Cumulative: most restrictive wins.

Source: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-basics

Practice questions

Single choice

Which Azure Policy effect stops a non-compliant create or update request before the resource is deployed?

  1. audit
  2. deny
  3. append
  4. auditIfNotExists
Show answer

Answer: B. deny

deny rejects the request. audit only records non-compliance, append adds properties to the request, and auditIfNotExists only reports on related resources after deployment.

Select all that apply

Which policy effects can bring existing non-compliant resources into compliance through a remediation task?

  1. modify
  2. deployIfNotExists
  3. deny
  4. audit
  5. auditIfNotExists
Show answer

Answer: A. modify, B. deployIfNotExists

Remediation tasks run the modify operations or the deployIfNotExists template on existing resources. deny, audit and auditIfNotExists only block or report; they have nothing to apply.

True or false

If a subscription-level assignment denies West US and a resource-group-level assignment allows only West US, the resource group assignment wins because it is closer to the resource.

Show answer

Answer: False

False. Each assignment is evaluated independently and the result is cumulative most restrictive, so the subscription-level deny still blocks West US resources in that group. Policy has no 'closest scope wins' rule.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-305 topics in this module