Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement and manage Azure Policy

A worked example

Single answer

You plan to assign a built-in policy with a Deny effect to a management group that contains production subscriptions. Before you enforce it, you must meet these requirements:

  • Evaluate every existing production resource to which the policy applies and view its compliance results.
  • Do not block any deployments during the test.
  • Do not modify the built-in policy definition, which other teams also use.
  • Do not generate Azure Activity log entries from the policy effect during the test.
  • Enable enforcement later without creating a new assignment.

What should you do?

Choose one answer
Why

Disabling enforcement on an assignment supports testing while Azure Policy continues to evaluate applicable resources and report compliance. The deny effect is not applied, and the policy effect does not trigger Activity log entries. This differs from the disabled effect, which stops evaluation completely. Enforcement can later be enabled on the same assignment without changing the built-in definition.

  • Not correct: Create the assignment, and create a policy exemption for each production subscription. Exempted resources are not assessed against the policy's requirements and appear as Exempted, so you would not see the required test results.
  • Not correct: Create the assignment, and add each production subscription to its notScopes property. Resources in excluded scopes are not evaluated or counted for compliance, so you cannot test the policy against them.
  • Not correct: Change the effect in the policy definition to disabled. The disabled effect prevents policy evaluation, so it would not provide the required compliance results.
  • Correct: Create the assignment with enforcement disabled, and enable enforcement on it later. Disabling policy enforcement allows compliance evaluation without applying the deny effect or triggering Activity log entries from that effect. Enforcement can be enabled on the same assignment later.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free