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

CertStreak
Menu

Design and implement governance and compliance by using Azure Policy

A worked example

Complete the statement

A policy assignment on your SAP production subscription uses a built-in definition with the deployIfNotExists effect. The definition requires virtual machines to send diagnostic logs to a Log Analytics workspace. SAP virtual machines deployed after the assignment comply. Thirty SAP HANA virtual machines that existed before the assignment show as non-compliant. You must bring these existing virtual machines into compliance by using Azure Policy.

Complete the statement.

Create a for the assignment, and make sure that the assignment's has permissions to create or update the targeted resources.

  • Blank 1: remediation task (correct answer)

    A remediation task fixes existing non-compliant resources in bulk, which is what the 30 virtual machines need. A policy exemption leaves the missing diagnostic settings unchanged. A policy initiative only groups policy definitions. A custom role defines permissions; it makes no changes to the virtual machines.

  • Blank 2: managed identity (correct answer)

    A deployIfNotExists assignment runs its deployments through its managed identity, so that identity needs permissions to create or update the targeted resources. The Log Analytics workspace is where the logs are sent; it does not run the deployment. An initiative definition is a group of policies and holds no permissions. An exclusion scope only removes subscopes from the assignment.

Why

Azure Policy supports automatic remediation for new resources and bulk remediation for existing resources. To correct the existing non-compliant virtual machines in this scenario, create a remediation task for the deployIfNotExists assignment. The assignment's managed identity must have sufficient permissions to create or update the resources needed for remediation.

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