The basics of Azure Policy
In this section, we’ll describe how Azure Policy works. We’ll focus on how it’s implemented and linked with Azure Resource Manager, what we can configure, and how to ensure that the implemented rules are applied correctly. Let’s start by discussing how Azure Policy relates to properties exposed by resources via Azure Resource Manager.
Azure Resource Manager and Azure Policy
As mentioned in Chapter 2, Basics of Infrastructure-as-Code, each resource in Azure is described by a set of fields, which are individual for each type of service. For example, let’s compare the configuration of a resource group with a storage account. In the following code snippet, we have a description of a resource group:
{ "type": "Microsoft.Resources/resourceGroups", "apiVersion": "2022-09-01", ...