Skip to content

Governance

Microsoft's design area: Governance.

What this area is

The rules that apply without someone remembering them: Azure Policy, initiatives, exemptions, and the tags and regions those rules check. Governance that only lives in a wiki will be skipped the first time a deployment is on fire.

What an enterprise does

  • Policy definitions and initiatives at the intermediate root, assigned on the management group that should feel them. Corp gets the public-network denies. Sandbox gets a budget and a smaller allow list, not the full production initiative.
  • A new control starts as Audit or as DoNotEnforce. It moves to Deny or DeployIfNotExists when the exceptions are understood. Exemptions are time-boxed and owned.
  • Tagging is Deny on resource groups, and Modify (inherit) onto resources, once pipelines always pass tags. Before that, Deny just trains people to hate policy.
  • Allowed locations Deny, including resource groups. Sovereign or industry estates add data-residency initiatives on top.
  • Policy as code in the same pipeline as the rest of the platform, with what-if, not clicks in the portal.

What this lab implements

Assigned by infra/main.bicep at subscription scope, except the public-IP denies, which are on rg-corp-* only.

Control Effect Why this effect
Built-in Allowed locations e56962a6-4747-49cd-b67b-bf8b01975c4c, version 1.1.0 Deny A resource in the wrong region is an easy way to miss the cost model. global is excluded by the built-in rule so private DNS and policy assignments still deploy
Custom companion for resource groups Deny The built-in above does not evaluate resource groups. Enterprise built-in equivalent: e765b5de-1225-4ba3-bd56-1ac6695af988
Tags Environment, CostCenter, Owner, Workload, DataClassification on resources and on resource groups Audit Deny would block portal experiments and any Azure resource that cannot take a tag at create time. Switch tagPolicyEffect to Deny only when every deployment path sets tags. Enterprise built-ins 871b6d14-10aa-478d-b590-94f262ecfa99 and 96670d01-0a4d-4649-9c89-2d3abc0a5025 are Deny-only, which is why the lab uses its own definitions
Public IP resources and NICs with a public IP, corp resource group only Deny This is the corp control. Online is out of scope so a later ingress experiment has a legal place to land
Virtual network diagnostic setting auditIfNotExists Reports a gap. Does not create a setting and cannot add ingestion

infra/policies.mg.bicep assigns the location policies at whatever management group you deploy it to. Use it when you want to see management-group assignment. Skip it while the subscription-level assignments exist and the only subscription is this one. Two copies of the same Deny are harder to debug.

Assignment names are 24 characters or fewer (alz-allowed-locs, alz-deny-pip, alz-res-env, …) because management group assignment names cannot be longer than that.

What this lab simplifies

  • No initiatives, no exemptions, no Modify/inherit tag policies. Inherit needs a managed identity and a remediation task.
  • No regulatory initiative (MCSB). Worth reading. Not worth assigning blindly on a free trial.
  • Audit results are not alerts. You have to open Policy → Compliance. That is fine for a lab and not fine for a client platform.
  • Custom definitions live at subscription scope (and the location companion can live at management group scope if you deploy that entry point). An enterprise publishes definitions once, up at the intermediate root, and assigns them many times.

Where the code is

  • infra/modules/policy/
  • infra/policies.mg.bicep
  • ADR 004