Most Azure estates are not designed. They accumulate. A team needs a database, a subscription is opened outside any agreed process, and a year later the organization owns hundreds of resources that nobody can fully explain. Nobody chose that outcome. It is simply what happens when building starts before governing.
This book is about doing it the other way around. It shows how to govern a full Azure estate layer by layer: the tenant, the management group tree, subscriptions per environment, roles, policy, network, security, visibility and cost. Each layer is treated as a door, and each door gets a contract: a short, written, checkable agreement about who may cross, what may cross, what must be true afterward and who finds out.
The method behind it is Governance-Driven Contract Design (GDCD). The foundational GDCD book, The Contract Decides: Governing AI at Every Door, introduced it for AI agents. This book applies the same spine to the cloud platform underneath. In production estates, the two are not separate problems. An AI workload is only as governed as the subscription, identity and network it runs in.
GDCD always moves in the same order. Start from the business outcome. Turn the outcome into guarantees, the promises the platform must keep. Spread the guarantees across four layers: quality, security, visibility and cost. Then write each guarantee as a contract at the door where it can be enforced, and make the platform enforce it, not goodwill.
The order matters. Teams that start from tools ("we need a firewall", "we should turn on Defender") end up with good products wired to no purpose. Teams that start from the outcome ("customer data never leaves the approved regions", "nobody holds standing admin rights in production") can trace every setting back to a reason. When an auditor, a new CISO or a new platform lead asks "why is this here?", the answer is already written down.
It is written for the people who answer for an Azure estate: the CIO who signs the budget, the cloud architect who draws the platform, the platform team lead who runs it, the CISO who must prove it is safe, and the FinOps lead who must explain every line of the bill. Each chapter opens with its point in plain words so that a leader can read the first page and know what to ask for. The rest of the chapter is the engineering detail a platform team needs to build it.
You do not need to read it front to back. The structure follows how a platform is built:
| Part | Chapters | What you will be able to do |
|---|---|---|
| I. Outcome first | 1 to 2 | Turn business outcomes into platform guarantees, and secure the tenant, the first door. |
| II. The structure | 3 to 4 | Draw the management group tree and the subscription map, and vend governed subscriptions on request. |
| III. Access and rules | 5 to 6 | Design roles that expire, and write policy that runs as a contract. |
| IV. Guarantee layers | 7 to 10 | Make the network private by default, watch security posture, see everything in one place and make every number add up. |
| V. Operate | 11 to 12 | Deploy only through code and pipelines, and run governance as a team with a 30-60-90 day rollout. |
| Appendix | After 12 | Templates: the management group and subscription map, role matrix, policy starter set, tag dictionary and readiness checklist. |
Microsoft renames things. Azure Active Directory became Microsoft Entra ID. Azure Security Center became Microsoft Defender for Cloud. The landing zone tooling has been rebuilt more than once. If this book taught button clicks, it would age in months. Instead, every chapter teaches the pattern first, then shows how Azure implements it today. The pattern is the durable part. The product name is the current address of the pattern.
Where the book names a product, a built-in role or a policy effect, it uses the name in Microsoft's documentation at the time of writing. Product names, built-in roles and features were checked against Microsoft documentation in November 2026. The guidance follows the Microsoft Cloud Adoption Framework and the Azure landing zone reference architecture, because they encode many years of field experience and because a platform that follows them is easier to hand over, audit and support. Where we depart from the reference, we say so and explain why.
The book assumes the Azure global cloud and one corporate tenant. Sovereign clouds such as Azure Government, servers and clusters outside Azure managed through Azure Arc, and estates operated by a partner through Azure Lighthouse follow the same patterns, but service availability and some features differ, so check the documentation for your cloud before you rely on a detail.
An estate is governed when, for every subscription, you can answer five questions in under a minute: who owns it, what it may contain, who may change it and for how long, where its logs go, and what it may cost. Every chapter adds the controls that make one of those answers true and provable.
Each chapter ends with a short contract checklist: three to six items you can tick against your own estate. Taken together, those checklists form a readiness review you can run against an existing estate. Each chapter also points to a live, interactive version of its diagrams at hub.jcardena.com/azure, where you can click through the management group tree, the role model and the policy set.
The companion book, AI Foundry by Contract, builds Microsoft Foundry on top of the platform described here. If your organization is being asked to deliver AI on Azure, read this book first. Every AI guardrail in the second book assumes the tenant, tree, subscriptions, roles and policy from this one.
One promise runs through every page: trust, earned at every layer. A platform earns trust the same way a person does, by keeping small promises consistently and leaving a record that it did.
See it live: hub.jcardena.com/azure
Governance added after the fact is always more expensive than governance designed in. Not a little more expensive. Every workload built without guardrails becomes a migration later: resources to move, permissions to unwind, public endpoints to close while users depend on them. The cheapest moment to decide who may deploy, where data may live and what things may cost is before the first resource exists.
Many inherited estates started the other way. A project needed results quickly. The team got an Owner role on a fresh subscription, built something that worked, and moved on. The next team copied the pattern. Two years later there are dozens of subscriptions with no common structure, logs that stay where they were born, and a monthly bill that nobody can split by product. The outcome followed from missing platform controls: the platform had no contract, so every team wrote its own.
Azure makes it easy to start. That is a strength. It also means that every default you do not change becomes your policy. New subscriptions land under the tenant root management group unless you set a different default. Any user can create a management group unless you require authorization for it. A person who creates a subscription often ends up as its owner. None of these defaults is wrong for a single team. All of them are wrong for an enterprise, and they compound quietly.
Drift has three faces that leaders recognize:
Each of these is a broken promise the business never knew it was relying on. GDCD names that promise first, then makes the platform keep it.
The method in this book starts with a short conversation with the business, not with a product list. What must never happen? What must always be true? What must we be able to prove? The answers are business outcomes. We then rewrite each one as a guarantee: a precise statement the platform can keep. Finally, we name the enforcer, the Azure mechanism that keeps the guarantee without relying on anyone's memory.
Notice that none of the guarantees mentions a product. "No resource is created outside the region list" will still be the right guarantee if the enforcer is renamed or replaced. That is the principle-over-tool rule from the preface, applied to a real decision.
Once the outcomes are written, sort the guarantees into the four layers that run through the whole GDCD series. Each layer has a smallest unit and a silent failure it refuses.
| Layer | What it guarantees on Azure | The silent failure it refuses | Chapters |
|---|---|---|---|
| Quality | Changes arrive through tested code and pipelines, and promotion from dev to test to prod is repeatable. | A manual fix in production that nobody can reproduce. | 4, 11 |
| Security | Identities are strong, access is minimal and temporary, networks are private by default. | A forgotten Owner or a public endpoint that nobody chose. | 2, 5, 7, 8 |
| Visibility | Every subscription sends its logs to one place, and every alert reaches a person. | An event that happened but left no record anyone could find. | 9 |
| Cost | Every resource has an owner and a cost center, every subscription has a budget. | The bill line nobody can explain. | 10 |
Contracts, the policy and role rules in Part III, are not a fifth layer. They are how all four layers are enforced. That is why this book spends two full chapters on roles and policy before it reaches the network.
Governing first does not mean a six-month design phase before anyone may deploy. That approach fails in a different way: teams go around the platform because it is not there yet. The pattern that works in practice is a thin, enforced foundation first, then fast delivery on top of it.
That foundation is deliberately small. The guarantee layers in Part IV and the operating model in Part V harden it over time. What matters is that the first workload lands inside a governed subscription, so the second and the fiftieth do too.
A platform team inherits an estate with many subscriptions, most sitting directly under the tenant root. The team does not start by moving anything. It first creates the management group tree, sets the default management group for new subscriptions to Sandbox, and assigns a small policy set in audit mode at the top of the tree and directly to the existing subscriptions, until they move into the tree. Within days, the compliance view shows exactly where the debt is. The estate did not change, but for the first time it could be measured. Chapter Twelve turns that first step into a 30-60-90 day rollout.
We do not quote a universal number for it, because it depends on the estate. The pattern, though, is consistent. Late governance arrives as three separate bills: one to build without guardrails, one to find out what was built, and one to fix it while it runs in production with users on it. Early governance costs once, and most of that cost is automation the platform team reuses for every later workload.
There is also a cost that never appears on a bill: trust. When a CISO cannot say who has admin rights in production, or a CFO cannot say which product drove last month's spend, confidence in the whole cloud program drops. A governed platform answers those questions in minutes. That is the real business outcome of everything that follows. Trust, earned at every layer.
See it live: the governance map at hub.jcardena.com/azure/governance.html
Every Azure action starts with a sign-in. Before anyone touches a subscription, a policy or a network, Microsoft Entra ID has already decided who they are and how sure it is. If that decision is weak, nothing built above it can be strong. The tenant is the first door, and it is the one that every other door trusts.
A Microsoft Entra tenant is the identity boundary of the organization. Every subscription trusts exactly one tenant, and the management group tree from Chapter Three lives inside it. All subscriptions in a management group must trust the same tenant. So the first platform decision is not about Azure resources at all. It is about how many tenants you have, and how strongly each identity in them proves itself.
Microsoft's landing zone guidance is clear: use a single Microsoft Entra tenant, usually the corporate tenant where people already sign in for email and collaboration, and create more tenants only when a requirement cannot be met in the corporate one. The reasons are practical. Azure landing zones are deployed per tenant, so every extra tenant means another tree, another policy set and another set of logs. Licenses for Microsoft Entra ID P1 or P2 do not span tenants. Many Azure services integrate natively with identities in their home tenant and offer limited support for guests from other tenants.
Separation inside one tenant is achieved with structure, not with more tenants: management groups and subscriptions for resources, and administrative units for delegating user and group administration. Sandbox subscriptions give teams room to experiment without a separate "test" tenant for Azure. A dedicated tenant for testing identity configuration itself can still make sense, but it should not hold Azure workloads.
Inside the tenant, we separate identities by what they are for, because each kind needs a different contract. Mixing them is one of the most common identity weaknesses in inherited estates.
| Identity | Contract |
|---|---|
| Daily account | Holds no administrative roles in Entra or Azure. Protected by multifactor authentication and Conditional Access like every user. |
| Admin account | A separate, cloud-only account used only for administration. Holds roles as eligible through Privileged Identity Management, activated when needed. Uses phishing-resistant authentication. |
| Emergency access | Two or more cloud-only accounts on the onmicrosoft.com domain, with passkey (FIDO2) or certificate-based authentication. Never used day to day, alerted on every sign-in. |
| Workload identity | Managed identities for Azure resources and federated credentials for pipelines. No shared passwords, no user accounts acting as service accounts. |
Microsoft now enforces multifactor authentication for Azure sign-ins. In the first phase, accounts signing in to the Azure portal, the Microsoft Entra admin center and the Intune admin center must complete MFA. In the second phase, accounts that create, update or delete resources through Azure CLI, Azure PowerShell, infrastructure as code tools, SDKs and the REST API must complete MFA too. Workload identities such as managed identities and service principals are not affected. User accounts used as service accounts are, which is one more reason to retire them.
Mandatory MFA is a floor, not a design. The contract for an enterprise tenant goes further: Conditional Access policies that require MFA for all users, phishing-resistant methods for administrators, and blocking of legacy authentication. Conditional Access needs Microsoft Entra ID P1 or P2. Tenants without it should at least turn on security defaults.
Workload identities cannot perform MFA, so their tenant contract is different. Conditional Access for workload identities can block a single-tenant service principal when it requests a token from outside known IP ranges, or when Microsoft Entra ID Protection rates it as risky. It needs Workload Identities Premium licenses, and it does not cover managed identities, which have no credential that anyone stores or handles. For people, ID Protection with Microsoft Entra ID P2 feeds user and sign-in risk into Conditional Access, so a risky sign-in can be blocked or forced through a secure password change.
Every strong control can lock you out. A federation outage, a misconfigured Conditional Access policy, or approvers who have all left can leave nobody able to administer the tenant. Emergency access accounts exist for that day. Microsoft's guidance is specific, and we follow it as written:
The alert is what turns an emergency account from a hidden risk into a governed door. Send Entra sign-in logs to the central Log Analytics workspace (Chapter Nine) and create a log alert rule that fires on any result:
// Any sign-in by an emergency access account raises a critical alert SigninLogs | where UserId == "<object-id-1>" or UserId == "<object-id-2>" | project TimeGenerated, UserPrincipalName, UserId, IPAddress, ResultType, ResultDescription
A quarterly emergency access drill works best as a calendar event with two people present. One signs in, one watches for the alert. The drill regularly catches drift that nothing else would: a Conditional Access policy added without the exclusion group, or an alert action group pointing at a mailbox that no longer exists.
Global Administrator controls the tenant, and a Global Administrator can elevate access to manage every Azure subscription and management group. Microsoft recommends keeping Global Administrator assignments to a minimum, fewer than five is preferred, making admin roles eligible through PIM, requiring approval to activate the most critical ones, and notifying stakeholders on activation. Use the narrower Entra roles for daily work. The setting "Access management for Azure resources" should stay off for Global Administrators who do not need it, because it grants User Access Administrator at the root of the tree.
Strong sign-in is wasted on a compromised device. Administrators of the tenant and the platform work from privileged access workstations: hardened, managed devices used only for administration, which Conditional Access can require for admin roles through device compliance. Applications are the other quiet path into the tenant. Restrict user consent, for example to verified publishers and low-risk permissions, or turn it off, and turn on the admin consent workflow so users can request approval instead of working around the block. Decide who may create app registrations, because by default any member user can, and give every registration a named owner.
See it live: the roles map at hub.jcardena.com/azure/governance-roles.html
A management group tree is an org chart for risk, not for people. Each branch holds subscriptions that need the same rules, and every rule assigned to a branch flows down to everything beneath it. Draw the tree around what workloads need, keep it shallow, and most of your policy and access design falls into place on its own.
Management groups are the governance scope above subscriptions. Policy assignments and role assignments made on a management group are inherited by every child management group, subscription, resource group and resource. That inheritance is the whole point. One assignment on the right branch replaces hundreds of per-subscription settings, and nobody below the branch can quietly opt out.
A few platform facts from Microsoft's documentation set the boundaries for any tree:
Six levels is a limit, not a target. The Cloud Adoption Framework recommends keeping the hierarchy reasonably flat, ideally no more than three to four levels. Every extra level is one more place where an inherited rule can surprise someone.
The Azure landing zone reference architecture gives a tree that fits most enterprises with little change. Our platform team starts every new tree from it, because it encodes field experience and because the next platform engineer will recognize it.
Each group has a clear job:
| Management group | Holds | Purpose of its rules |
|---|---|---|
| Intermediate root | Everything below, named with an organization prefix | Lets you avoid assigning anything at the tenant root, and gives a single top for the estate's baseline. |
| Platform | Identity, Management, Connectivity and Security groups | Each holds a dedicated subscription: identity services, the central Log Analytics workspace, the hub network, and security tooling such as Microsoft Sentinel. |
| Landing zones | Corp, Online, and optionally Local | Corp is for workloads that connect to the corporate network through the hub. Online is for workloads that need direct internet access or no virtual network. |
| Sandbox | Experiment subscriptions | A less restrictive policy set for exploration, isolated from corp and online landing zones. |
| Decommissioned | Cancelled landing zones | Parking for subscriptions on their way out, with guardrails that stop new use. |
The default policy assignments in the Azure landing zone accelerators follow this shape. At the time of writing, for example, the Corp group carries a Deny assignment that disables public network access for PaaS services, and Sandbox and Decommissioned each carry their own guardrail initiative. The exact list evolves with each release, so treat the accelerator's current assignments as a starting point to review, not as a fixed standard.
The arithmetic behind the second rule is worth showing to anyone who wants environment groups. Thirty workloads, each with its own group plus children for development, test and production, produce 120 management groups. That is the example Microsoft uses in its own guidance, and every one of those groups is a place where rules can diverge between environments.
The tree is a contract, so changes to it need their own guardrails. Two hierarchy settings matter from day one. First, require authorization for management group operations, so only principals with the right Azure RBAC permission can create groups. Second, set a default management group for new subscriptions. Microsoft suggests the Sandbox group as a good candidate, so that any new subscription arrives with a policy set already applied instead of landing under the root with none.
Build the tree from code like everything else (Chapter Eleven). A management group is a small resource deployed at tenant scope:
targetScope = 'tenant'
param prefix string = 'org'
resource landingZones 'Microsoft.Management/managementGroups@2021-04-01' = {
name: '${prefix}-landingzones'
properties: {
displayName: 'Landing zones'
details: {
parent: {
id: tenantResourceId('Microsoft.Management/managementGroups', prefix)
}
}
}
}
Moves matter as much as creation. Moving a subscription between branches changes which policies apply to it, and Azure Resource Manager can cache hierarchy details for up to 30 minutes, so the portal may lag behind a move. Moves are made by the platform team through the pipeline, never by hand, and every move is visible in the activity log at management group scope.
When an existing subscription moves from the root into Corp, it suddenly inherits a Deny on public endpoints. Existing resources keep running and show as non-compliant, and the next change to them is denied. Microsoft also documents cases where policy blocks the move itself because of resource properties inside the subscription. We therefore move subscriptions only after the policy set has run in audit against them and the owners have a plan, or after every Deny on the target branch has been set to DoNotEnforce, so the move changes what is measured, not what is allowed. Where a move must happen first, a time-boxed exemption with an expiry date covers the gap; for the blocked-move case, an exemption can be created before the move with its assignment scope validation set to DoNotValidate, a setting in preview at the time of writing. Chapter Six shows how exemptions work.
See it live: the landing zone map at hub.jcardena.com/azure/governance-landing-zone.html
A subscription is the unit of control in Azure. It is where access is granted, where a budget is set, where quotas apply and where the bill is split. Give each workload one subscription per environment, place them in the right branch of the tree, and let a vending machine create them. Then every new workload starts governed, in minutes, without a ticket queue.
The Cloud Adoption Framework calls this subscription democratization: subscriptions, not resource groups, are the primary unit of workload management and scale. That choice has a direct governance payoff. A subscription is a strong boundary for access, billing, quota and deployment. Access granted inside one subscription does not reach another, a budget alert names one owner, and a mistake in development cannot touch a production resource it cannot see. Two things cross it on purpose: roles inherited from a management group, and network paths built between subscriptions.
Microsoft's guidance is that, ideally, each application environment has its own subscription. Development, test and production for the same workload become three subscriptions, all placed in the same archetype management group, Corp or Online. Sandbox is the one exception: exploratory work lives in subscriptions under the Sandbox group, with a looser policy set and no path into the corporate network.
| Workload | Archetype group | Development | Test | Production |
|---|---|---|---|---|
| Claims portal | Corp | sub-claims-dev | sub-claims-test | sub-claims-prod |
| Public website | Online | sub-web-dev | sub-web-test | sub-web-prod |
| Data platform | Corp | sub-data-dev | sub-data-test | sub-data-prod |
| Team experiments | Sandbox | sub-sbx-<team>, time-limited, no corp connectivity | ||
Why not management groups for each environment? Because Microsoft's guidance, and our experience, is that the development lifecycle environments should not have different guardrails. If development allows a public storage account and production denies it, the team only discovers the problem at the last step, after building around the wrong design. Keep the guardrails the same and let the subscription boundary provide the isolation. Where production genuinely needs an extra obligation, such as backup, add it at subscription scope during vending.
There are honest exceptions. Some designs share a single resource across environments, App Service deployment slots being a common example, because a slot lives on one App Service plan in one subscription. Microsoft's guidance allows a single subscription for several environments when they cannot be isolated, share the same operators and can use the same policies. Write the exception down and protect it with resource group scoped access through PIM.
Subscription vending is the platform mechanism that issues governed subscriptions on request. It gives workload teams one official front door, gives the platform team control of every subscription's starting state, and replaces weeks of tickets with a pipeline run. Three teams take part: the Cloud Center of Excellence sets the business rules and approval logic, the workload team requests, and the platform team's automation creates and configures the subscription before handing it over.
The intake form is where governance becomes cheap. Microsoft recommends gathering at intake the anticipated budget, the subscription owners, networking expectations, and the business criticality and confidentiality classification. Those answers decide placement in the tree, the network shape, the budget and who approves. Integrate the form with your existing IT service management tool, so approvals, audit history and reporting live where the organization already looks for them, and use an IP address management tool so that no two spokes overlap.
Three details are easy to miss. First, the request must say whether the workload is Production or DevTest, because the Dev/Test offer has lower rates for some resources but different terms, and is not available under every agreement type. Second, quotas apply per subscription and per region, for example vCPUs per virtual machine family, so a new subscription starts with default limits. The intake form should ask for the expected scale, and the vending pipeline should request the quota increases the workload needs before handover, so the first production deployment does not stall on a limit. Third, budgets are alerts, not hard limits. The vended budget tells owners when spend approaches the threshold; it does not stop resources. Chapter Ten covers the controls that do.
Microsoft publishes subscription vending modules for Bicep and Terraform as Azure Verified Modules. The pipeline, run from GitHub Actions or Azure Pipelines with a federated workload identity, calls the module with the parameters from the approved request. A shortened Bicep example:
targetScope = 'managementGroup'
// Parameter names as published for module version 0.8.0.
module claimsProd 'br/public:avm/ptn/lz/sub-vending:0.8.0' = {
name: 'vend-claims-prod'
params: {
subscriptionAliasEnabled: true
subscriptionAliasName: 'sub-claims-prod'
subscriptionDisplayName: 'sub-claims-prod'
subscriptionBillingScope: billingScope
subscriptionWorkload: 'Production'
subscriptionManagementGroupAssociationEnabled: true
subscriptionManagementGroupId: 'org-corp'
subscriptionTags: {
owner: 'claims-product-owner'
costCenter: 'CC-1042'
environment: 'prod'
workload: 'claims'
dataClassification: 'confidential'
}
roleAssignmentEnabled: true
roleAssignments: [
{
principalId: claimsReadersGroupId
definition: 'Reader'
relativeScope: ''
principalType: 'Group'
}
]
budgetName: 'budget-claims-prod'
budgetAmount: budgetFromRequest
budgetThresholds: [ 80, 100 ]
}
}
param billingScope string
param claimsReadersGroupId string
param budgetFromRequest int
Pin the module version your platform team has tested, and upgrade it deliberately. Note what the example does not do: no person receives standing write access. Contributor for the workload team is configured as an eligible assignment through PIM for Groups, as Chapter Five describes, because elevated access to a new subscription should never be permanent by default. Creating subscriptions programmatically also requires the right billing role on your Enterprise Agreement, Microsoft Customer Agreement or partner agreement; check those prerequisites before the first run.
A name tells a person what a resource is. A tag tells a machine. Both need a standard that the platform enforces rather than requests. For names, we follow the Cloud Adoption Framework pattern of resource type, workload, environment, region and instance, for example vnet-claims-prod-weu-001. Some resource types restrict characters: storage account names allow only lowercase letters and numbers, so the same pattern becomes stclaimsprodweu001. For tags, keep the required set small and meaningful:
| Tag | Meaning | Enforced by |
|---|---|---|
| owner | The accountable team or role, never a single person's name | Vending sets it on the subscription; policy inherits it to resources |
| costCenter | Where the spend is charged | Same: set once, inherited by policy |
| environment | dev, test, prod or sandbox | Set by vending, matches the subscription |
| workload | Short workload name | Set by vending, matches the subscription |
| dataClassification | public, internal, confidential, restricted | Required on resources holding data |
Azure Policy has built-in definitions for both halves of this. Inherit a tag from the subscription if missing uses the Modify effect to copy a subscription tag onto resources, and remediation tasks can fix existing ones. Require a tag on resources uses Deny for tags that only the deploying team can know. Chapter Six explains how those effects behave, and the appendix holds a full tag dictionary.
See it live: the landing zone map at hub.jcardena.com/azure/governance-landing-zone.html
Access in most estates has a start date and no end date. Someone needed to fix something once, received Owner, and still has it. The fix for that is simple to say: give access to groups, not people; give the smallest role at the lowest scope; and make every powerful role temporary, activated only when needed and expiring on its own.
Azure role-based access control (Azure RBAC) answers the question "who may do what, where". Every role assignment has three parts: a security principal (a user, group, service principal or managed identity), a role definition (a set of permitted actions), and a scope (management group, subscription, resource group or resource). Assignments at a parent scope are inherited by every child. GDCD adds a fourth part that RBAC on its own leaves open: for how long.
Azure has hundreds of built-in roles. Microsoft groups them into two kinds. Job function roles manage specific resource types, for example Virtual Machine Contributor or Storage Blob Data Reader. Privileged administrator roles grant broad management or the ability to grant access to others. Microsoft lists these as privileged:
| Role | Why it is privileged | Governed default |
|---|---|---|
| Owner | Full management of all resources, and can assign roles | Eligible only, small platform group, approval required in prod |
| Contributor | Full management of all resources, cannot assign roles | Eligible for workload teams on their own subscriptions |
| User Access Administrator | Manages access, can grant itself or others Owner | Eligible, platform identity team only |
| Role Based Access Control Administrator | Manages access, can grant Owner unless constrained | Use with a condition that limits which roles it may assign |
| Reservations Administrator | Manages all reservations in the tenant | FinOps team only, eligible |
Prefer a job function role whenever one exists. A team that needs to read blobs gets Storage Blob Data Reader, not Contributor and certainly not Owner. When you must delegate the ability to assign roles, Microsoft recommends adding a condition to the Role Based Access Control Administrator assignment so the delegate can only grant the specific roles you allow, for example only data reader roles, and never Owner. Microsoft also recommends a maximum of three subscription owners, a check that Microsoft Defender for Cloud reports on. Create custom roles only when no built-in role fits, list their actions explicitly without wildcards, and reference roles by their ID in automation, because names can change.
Assign roles to Microsoft Entra groups, never directly to users. It keeps the number of assignments small, which matters because Azure limits role assignments per subscription and per management group. More importantly, it moves the question "should this person have access?" to group membership, where joiners, movers and leavers processes and access reviews can answer it. A naming pattern helps everyone read the model, for example grp-claims-prod-contributor: workload, environment, role.
Microsoft Entra Privileged Identity Management (PIM) turns standing access into eligible access. An eligible member holds the right to activate a role, not the role itself. To use it, they activate for a bounded time, and PIM can require, per role and per scope:
PIM settings are defined per role and per resource, and settings at a subscription are not inherited by resource groups below it. Configure them deliberately at each scope where you grant access, from code where possible. PIM for Groups lets you make membership of a privileged group eligible, which is how a vended subscription can grant a workload team Contributor without granting it permanently. PIM requires Microsoft Entra ID P2 or Microsoft Entra ID Governance licenses for the users who hold eligible assignments and for approvers; confirm coverage before you design around it.
| Persona | Development | Test | Production |
|---|---|---|---|
| Workload developer | Contributor, eligible, no approval | Reader standing; Contributor eligible | Reader standing; no write |
| Workload lead | Contributor, eligible | Contributor, eligible | Contributor, eligible, approval required |
| Platform engineer | Owner eligible at the Landing zones management group; separate eligible roles at the Platform management group or its subscriptions, least privilege; approval required, at least two approvers configured | ||
| Deployment pipeline | Contributor on its own subscription | Contributor on its own subscription | Contributor on its own subscription, separate identity |
| Security operations | Security Reader standing; Security Admin eligible | ||
Pipelines and applications need identities too, and they cannot hold eligible roles in PIM, because they cannot complete an activation. Their role assignments are always active, which is why the scope must be narrow and the credential must not leak. The contract for workload identities:
Access that is not reviewed drifts back to standing. Run access reviews on privileged groups and on eligible assignments, quarterly for production at a minimum, and let owners confirm or remove. Then check the result independently. Azure Resource Graph exposes role assignments, so a scheduled query can find what the contract forbids, for example a privileged role assigned directly to a user:
authorizationresources
| where type =~ "microsoft.authorization/roleassignments"
| extend roleDefinitionId = tostring(properties.roleDefinitionId),
principalType = tostring(properties.principalType),
scope = tostring(properties.scope)
| extend roleId = tostring(split(roleDefinitionId, "/")[-1])
| where roleId in~ (
"8e3af657-a8ff-443c-a75c-2fe8c4bcb635", // Owner
"b24988ac-6180-42a0-ab88-20f7382dd24c", // Contributor
"18d7d88d-d35e-4fb5-a5c3-7773c20a72d9", // User Access Administrator
"f58310d9-a9f6-439a-9e8d-f62e7b41a168") // Role Based Access Control Administrator
| where principalType == "User"
| project scope, roleDefinitionId, principalId = tostring(properties.principalId)
Active assignments appear in this table, including activated PIM roles while they are active. An empty result is one control result, not proof on its own: keep it with the query, the scope and the timestamp, next to the group membership and PIM reviews that cover access granted through groups. A non-empty result is a finding with a scope and a principal, ready for the owner to fix.
Two more populations need the same discipline. Guests from partner organizations should arrive through entitlement management access packages in Microsoft Entra ID Governance, which carry an approver and an expiration, and stay covered by recurring access reviews. Service principals that hold privileged roles can be included in PIM access reviews too, which needs Workload Identities Premium licenses on top of P2 or ID Governance, so a forgotten automation account is found by the same process as a forgotten person.
In a typical first review, most direct user assignments turn out to be leftovers from projects that ended. The platform team does not remove them in one sweep. It publishes the list, converts the ones still needed into group-based eligible assignments, gives owners a fixed window, and then removes the rest. The Resource Graph query above becomes the control that keeps the number at zero.
See it live: the roles map at hub.jcardena.com/azure/governance-roles.html
A standard written in a document is checked when someone remembers to check it. A standard written as Azure Policy is checked on every create and every update, by the platform, and reported every day. That is the difference between a wish and a contract. Policy is where the guarantees from Chapter One stop being promises and start being enforced.
Azure Policy evaluates resources against rules and reports or acts on what it finds. Each policy definition has one rule and one effect. Definitions are grouped into initiatives, also called policy sets, and both are assigned to a scope: a management group, a subscription or a resource group. Assignments inherit down the tree from Chapter Three, so one assignment on the Landing zones group governs every workload subscription beneath it.
Azure Policy supports these effects: addToNetworkGroup, append, audit, auditIfNotExists, deny, denyAction, deployIfNotExists, disabled, manual, modify and mutate. Five carry most enterprise governance, and each is a different kind of contract clause.
| Effect | What it does | Contract clause |
|---|---|---|
| Audit | Allows the request and marks the resource non-compliant. Judges the resource on its own properties. | "We will know." Observe before you enforce. |
| AuditIfNotExists | Marks a resource non-compliant when a related resource is missing, for example a VM without a required extension. | "We will know if the companion is missing." |
| Modify | Adds, updates or removes properties or tags on create or update, and can remediate existing resources. | "We will correct it for you." Typical for tags. |
| DeployIfNotExists | Deploys a related resource when it is missing, for example diagnostic settings that send logs to the central workspace. | "We will add what is required." |
| Deny | Rejects the create or update request before it reaches the resource provider. | "This will not happen." |
Two details matter in practice. Modify and DeployIfNotExists change resources, so their assignments need a managed identity with the right roles to do the work, and existing resources are fixed through remediation tasks. And when several assignments apply to the same resource, each is evaluated independently and the net result is cumulative most restrictive: if any assignment denies, the request is denied.
Every policy in the set should trace back to a guarantee. The landing zone accelerators assign a sensible baseline, and we add the rules our outcomes require. A typical starter set, by scope:
| Guarantee | Policy (built-in where one exists) | Effect | Scope |
|---|---|---|---|
| Resources deploy only to approved regions | Allowed locations | Deny | Landing zones |
| Every resource has an owner and cost center | Inherit a tag from the subscription if missing | Modify | Intermediate root |
| No public PaaS endpoints for corp workloads | Public network access should be disabled for PaaS services (landing zone initiative) | Deny | Corp |
| Every subscription sends logs to one place | Diagnostic settings to the central workspace | DeployIfNotExists | Intermediate root |
| Security baseline is measured | Microsoft cloud security benchmark | Audit, AuditIfNotExists | Intermediate root |
The full starter set, with effects for sandbox and landing zones, is in the appendix. Network and security policies are covered with their layers in Chapters Seven and Eight.
Note what Allowed locations promises and what it does not. It controls the location of the resources it covers. It does not, on its own, prove where data travels: global services, geo-replication, backup storage and support processes each have their own settings. A data residency guarantee needs those service settings as well, written into the same contract.
A common rule of thumb is "audit in dev, deny in prod". We use a different one, because Microsoft's landing zone guidance warns against giving development, test and production different guardrails: teams build against the looser rules, then fail at the last promotion step. Our rule is audit first, deny once clean, and the same guardrails in every environment. The difference between audit and deny is a stage in time, not a difference between environments. Sandbox is the only place with a deliberately looser set.
One distinction keeps the rule honest. Guardrails are the rules about location, network exposure, identity and security configuration, and they are identical in dev, test and prod. Cost and scale parameters, such as the allowed SKU list, auto-shutdown or the depth of resource logging, may differ by environment (Chapter Ten); set them as parameters at subscription scope during vending. Production may add obligations, such as backup. No environment removes a guardrail.
Azure Policy gives you the tools to stage that rollout safely:
targetScope = 'managementGroup'
resource allowedLocations 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
name: 'allowed-locations'
properties: {
displayName: 'Resources only in approved regions'
policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
enforcementMode: 'DoNotEnforce' // stage 1: report only; switch to 'Default' once clean
parameters: {
listOfAllowedLocations: { value: [ 'westeurope', 'northeurope' ] }
}
nonComplianceMessages: [
{ message: 'Region not approved. See the platform guide or contact the platform team.' }
]
}
}
Where an environment truly needs an extra obligation, such as backup only in production, Microsoft suggests assigning it at subscription scope during vending, or auditing at management group scope and letting the workload team implement it. Keep security guardrails at management group scope. Subscription-scoped assignments can be changed by people with elevated rights on that subscription, which is also why permissions to write policy assignments, definitions and exemptions should never be standing; put them behind PIM.
Every real estate has exceptions. A contract without a way to handle them gets bypassed. Azure Policy exemptions are the sanctioned path, and they carry exactly the fields a governance contract needs: which assignment, which definitions within it, a category, metadata for who asked and who approved, and an expiry.
{
"properties": {
"displayName": "Claims legacy API: public endpoint until migration",
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/org-corp/providers/Microsoft.Authorization/policyAssignments/deny-public-endpoints",
"exemptionCategory": "Waiver",
"expiresOn": "2027-03-31T23:59:00.0000000Z",
"metadata": {
"requestedBy": "claims workload team",
"approvedBy": "platform security lead",
"ticketRef": "CHG-0000"
}
}
}
There are two categories. Waiver means the non-compliance is temporarily accepted. Mitigated means the intent of the policy is met another way. When expiresOn passes, Azure does not delete the exemption; it keeps the object for record-keeping and simply stops honoring it, so the resource becomes non-compliant again and, under Deny, its next update is blocked. Creating an exemption requires its own permission on the target assignment, beyond normal write access, and built-in roles such as Resource Policy Contributor and Security Admin can manage them.
A workload team asks for a public endpoint on a storage account in production because a partner integration needs it this week. Under a document-based standard, the answer depends on who is asked. Under policy, the Deny on Corp decides, and the path is clear: request a Waiver, state the plan to move to private connectivity, get approval, receive an exemption that expires at the end of the quarter. The engineer moves on in a day. The exception is visible, owned and temporary.
See it live: the policy map at hub.jcardena.com/azure/governance-policy.html
Here is the point in plain words: in a governed estate, no data service is reachable from the internet unless someone wrote down why, and the platform checks that promise every time a resource is created. Private is the default. Public is the exception, and an exception has an owner, a reason and an end date.
Parts II and III gave the estate its structure and its rules. Chapter Three placed a Connectivity management group under Platform. Chapter Four gave every workload its own subscription per environment. Chapter Six made policy the contract that runs. This chapter is where those pieces meet the wire. The network is the first guarantee layer because it decides what can even reach a resource before identity, encryption or monitoring get a chance to help.
The guarantee we write is short: data services in every workload environment accept traffic only over private paths; all outbound traffic leaves through a point we inspect and log; name resolution works the same from every spoke and from the office. Every line holds, or the guarantee is a wish.
Microsoft's Cloud Adoption Framework describes two network topologies for a landing zone. Both put shared network services in one central place and connect workload networks to it. They differ in who runs the routing.
Choose by those criteria, not by habit. Hub and spoke is often the simpler start in one or a few regions, because it is easier to reason about and to explain to an auditor; Virtual WAN earns its place when managed, global routing is the requirement. The contract is the same either way. The pattern outlives the product choice: one hub per region, owned by the platform team, sitting in the connectivity subscription; spokes owned by workload teams, sitting in their own landing zone subscriptions; no spoke talks to another spoke except through the hub.
A private endpoint is a network interface in your virtual network that gets a private IP address and connects to one platform service, such as a storage account, a key vault or a database. Traffic to that service then stays on private paths. Pair it with turning off public network access on the service itself, and the service refuses calls from the internet no matter what anyone types.
That last step matters. Microsoft's documentation is explicit that DNS resolution and access control are independent. The public name of a resource still resolves from anywhere; what stops an outside caller is the service's own public network access setting or firewall. A private endpoint without that setting is a second door, not a locked first one.
Applications keep using the normal service name, for example the blob endpoint of a storage account. Azure's public DNS answers with an alias into a privatelink zone, and your private DNS zone answers that alias with the private IP. If the private zone is missing, linked to the wrong network, or duplicated in a spoke, the application either reaches the public endpoint (and gets refused) or fails to resolve at all. The symptom looks like an application bug. The cause is a broken contract at the DNS door.
The Cloud Adoption Framework pattern for doing this at scale is the one we run:
privatelink private DNS zones once, in the connectivity subscription, using Microsoft's recommended zone names (for example privatelink.blob.core.windows.net for blob storage and privatelink.vaultcore.azure.net for Key Vault). Use those exact names: the public DNS alias for each service points into the zone of that name, so a zone with any other name never answers. Private DNS autoregistration is a different feature; it creates records for virtual machines only, not for private endpoints.blob.core.windows.net, not the privatelink name, as Microsoft's private endpoint DNS guidance specifies.privatelink prefix.The landing zone reference implementation ships an initiative for this, titled "Configure Azure PaaS services to use private DNS zones". Prefer built-in or reference definitions over hand-written ones, and keep them current.
Chapter Six set the convention: the same guardrails in dev, test and prod, audit first and deny once the estate is clean. For network exposure the rule per service is small. This one refuses any storage account in scope that leaves public network access on:
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{ "field": "type", "equals": "Microsoft.Storage/storageAccounts" },
{ "field": "Microsoft.Storage/storageAccounts/publicNetworkAccess",
"notEquals": "Disabled" }
]
},
"then": { "effect": "[parameters('effect')]" }
},
"parameters": {
"effect": { "type": "String", "allowedValues": ["Audit", "Deny", "Disabled"],
"defaultValue": "Audit" }
}
}
The definition is assigned once, at the Landing zones management group, with the effect parameter set to Audit. When the compliance view is clean, the same assignment switches to Deny on a date agreed in advance. Dev, test and prod get the same rule at the same strength, and the switch date applies to the whole landing zone scope at once.
Private by default applies to data services. Online landing zones still publish applications to the internet, and the contract decides how: through one governed front door, Azure Front Door or Application Gateway with a Web Application Firewall (WAF) policy, while the databases and storage behind it stay private. The built-in policies Azure Web Application Firewall should be enabled for Azure Front Door entry-points and Web Application Firewall (WAF) should be enabled for Application Gateway make that rule checkable.
Azure DDoS Protection works at network layers 3 and 4; the WAF covers layer 7. DDoS Network Protection is a plan linked to virtual networks, and one plan can serve virtual networks across subscriptions in the tenant; DDoS IP Protection is the per-IP alternative. Without either, the default infrastructure protection still applies. Decide per archetype, typically Online and any spoke with public IP addresses, record the cost with Chapter Ten, and audit coverage with Virtual networks should be protected by Azure DDoS Protection.
Inside the network, every workload subnet gets a network security group and a route table that sends internet-bound traffic to the hub firewall. Application security groups let rules name roles, such as web, app and data, instead of IP addresses. Subnets should be associated with a Network Security Group audits the first half; the route table is set by vending with the spoke.
Private inbound is half the guarantee. The other half is outbound. Spokes send internet-bound traffic to the firewall in the hub through a route table, and the firewall's diagnostic logs flow to the central workspace you will meet in Chapter Nine. When a workload needs a new outbound destination, it is a firewall rule change through the pipeline in Chapter Eleven, not a public IP attached in a hurry.
| Rule | Stage 1: audit, days 1 to 60 | Stage 2: enforced | Applies to |
|---|---|---|---|
| Public network access on data services | Audit | Deny | Dev, test and prod |
| Private DNS zones created in spokes | Audit or DoNotEnforce | Deny | Dev, test and prod |
| Private endpoint DNS records | DeployIfNotExists into central zones | Dev, test and prod | |
| Public IP on virtual machine NICs | Audit | Deny | Dev, test and prod |
| Internet egress | Through the hub firewall, logged centrally | Every spoke | |
A team cannot reach its new storage account from a build agent and asks for public access "for one week". In an ungoverned estate, that week becomes a year. Here the request is a policy exemption with an owner, a reason and an expiry date (Chapter Six). The usual root cause turns out to be a private endpoint created without a DNS record, which the DeployIfNotExists policy now fixes on its own.
privatelink zones exist in the connectivity subscription, with recommended names.See it live: the landing zone map at hub.jcardena.com/azure/governance-landing-zone.html
The plain point first: security you cannot see is security you are only hoping for. A governed estate measures its own posture every day, shows that measure to the people who own the risk, and turns the most common fixes into rules so the same finding never comes back.
Chapter Seven closed the network doors. This chapter covers what sits behind them: the posture of every resource, the secrets that applications use, the identities that use them, the few resources that must never be deleted by accident, and the promise that data can come back after a bad day. Each of these is a guarantee. Each needs an enforcer and a piece of evidence, or it is not a guarantee at all.
Microsoft Defender for Cloud continuously assesses Azure resources against a security standard. When it is turned on for a subscription, the Microsoft cloud security benchmark (MCSB) is applied by default, and every finding becomes a recommendation with the affected resources listed.
Two posture plans exist, and the difference matters for budgeting:
Separate workload protection plans (for servers, storage, databases, containers, Key Vault and others) add threat detection for those resource types. The pattern we use is simple: Foundational CSPM everywhere from day one, Defender CSPM and the workload plans on production and on anything that holds regulated data, decided per resource type and written into the cost model from Chapter Ten. Prices and billable resources change, so check the current Defender for Cloud pricing page before you commit.
Secure score rolls the findings into a single percentage per subscription, per management group and for the whole estate. Higher means less identified risk. Two details keep it honest:
Because the score is data, it can be queried. This Azure Resource Graph query, taken from Microsoft's documentation pattern, returns the score per subscription so the operating review in Chapter Twelve can trend it:
SecurityResources | where type == 'microsoft.security/securescores' | extend current = properties.score.current, max = todouble(properties.score.max) | project subscriptionId, current, max, percentage = ((current / max) * 100)
Auditors ask about standards, not scores. The regulatory compliance dashboard in Defender for Cloud maps assessments to the controls of standards such as ISO/IEC 27001:2022, PCI DSS v4.0.1, NIST SP 800-53 and the EU Digital Operational Resilience Act (DORA). MCSB is assigned by default. Adding other standards needs a paid Defender for Cloud plan (Defender for Servers Plan 1 and Defender for APIs Plan 1 do not qualify) and Owner or Resource Policy Contributor rights. Underneath, each standard is an Azure Policy initiative, so assign it at the highest scope it applies to, usually the intermediate root. Two cautions: controls that cannot be assessed automatically appear greyed out and still need manual evidence, and a green dashboard is evidence for an audit, not a certification.
Secrets, keys and certificates live in Azure Key Vault, never in code, pipeline variables or app settings. Four practices carry most of the weight:
Applications reach the vault with a managed identity, not a stored credential. A system-assigned identity lives and dies with its resource; a user-assigned identity can be shared by a few resources that genuinely form one workload. Either way, there is no password to rotate and nothing to leak in a log.
A resource lock overrides every user's permissions on the control plane. CanNotDelete allows changes but blocks deletion. ReadOnly blocks changes and deletion. In the portal the same two levels are called Delete and Read-only. Locks inherit down from a subscription or resource group, and only roles with Microsoft.Authorization/locks/*, such as Owner and User Access Administrator, can create or remove them.
Use CanNotDelete on the small set of things whose loss would stop the estate: the hub network, the central Log Analytics workspace, production key vaults, backup vaults, the private DNS zones. Be careful with ReadOnly. Microsoft documents side effects: on a storage account it blocks listing keys; on a resource group it can stop virtual machines from starting and block App Service scaling. Locks also apply only to the control plane. Deleting a blob, a secret or the rows of a database still works under any lock, so protect data with soft delete, versioning and backup instead.
param location string = resourceGroup().location
param kvName string
resource kv 'Microsoft.KeyVault/vaults@2023-07-01' = {
name: kvName
location: location
properties: {
tenantId: subscription().tenantId
sku: { family: 'A', name: 'standard' }
enableRbacAuthorization: true
enablePurgeProtection: true
publicNetworkAccess: 'Disabled'
}
}
resource kvLock 'Microsoft.Authorization/locks@2016-09-01' = {
name: 'kv-cannot-delete'
scope: kv
properties: {
level: 'CanNotDelete'
notes: 'Production secrets vault. Removal needs a change record.'
}
}
Vulnerability findings close only when someone patches. Azure Update Manager assesses and installs updates for Azure virtual machines and Azure Arc-enabled servers; built-in policies turn on periodic assessment, and maintenance configurations set patch windows per environment. The RACI in Chapter Twelve names the owner: the workload team for its own machines, the platform team for platform machines.
"We have backups" is an assertion. The guarantee is a recovery point objective (how much data you may lose) and a recovery time objective (how long you may be down) per workload tier, agreed with the business owner, plus evidence that a restore was tested. We record both targets as tags on the production subscription, protect backup vaults with locks, and schedule a restore test each quarter whose result is reviewed in Chapter Twelve. Turn on soft delete and immutability on Recovery Services and Backup vaults, and for regulated data lock the immutability setting. Only locked immutability is irreversible, so only then can a compromised administrator not switch it off and erase the restore points. Azure Policy has built-in definitions that audit whether virtual machines are protected by Azure Backup, and others that configure it; audit at the Landing zones group and configure at production subscriptions during vending, as Chapter Six allows for production-only obligations.
Backup answers data loss. Resilience answers an outage, and it is decided per workload tier:
A platform team fixed dozens of findings and watched the secure score barely move. Every fix was correct, but the fixes were spread thinly: one recommendation here, another there, on resources that still failed other recommendations in the same controls. Few resources became fully healthy, so few points were added. The team switched to closing whole controls on whole sets of resources, starting with the highest maximum score, and moved the recurring fixes into deny policies. The score then rose steadily and stayed there.
See it live: the policy and posture page at hub.jcardena.com/azure/governance-policy.html
In plain words: every change, every resource log and every alert in the estate lands in one place that the platform team owns, and every alert that matters reaches a named person. If an event cannot be found later, for the purposes of governance it did not happen, and neither did the control that was supposed to catch it.
The earlier chapters wrote contracts for the tenant, the tree, the subscriptions, the roles, the policies, the network and the posture. Each contract has an evidence clause. This chapter is where that evidence is collected. In GDCD terms, visibility is the layer that turns assertions into records: who did what, where, when, and what the system decided.
Microsoft's workspace design guidance is direct: start with a single Log Analytics workspace and add more only when a criterion demands it. The main criteria it lists:
In the Azure landing zone layout, the workspace sits in the management subscription under the Platform branch from Chapter Three, owned by the platform team and protected by a CanNotDelete lock (Chapter Eight).
Turning on resource logs by hand does not scale and does not survive the next new resource. Azure Policy ships built-in initiatives that do it for every supported resource type, one per destination and per log category group. The two category groups are allLogs and audit. For example, the initiative "Enable allLogs category group resource logging for supported resources to Log Analytics" deploys a diagnostic setting on each supported resource in scope.
Three details make it work. The effect is DeployIfNotExists, so it acts on new resources as they are created. Existing resources need a remediation task, one per policy in the initiative. And the assignment needs a managed identity with a role that can write diagnostic settings at the assignment scope. Assign the audit category group initiative once at the intermediate root, so platform subscriptions are covered as well as landing zones, and every subscription the vending process creates (Chapter Four) arrives with logging already on. Add the allLogs initiative at production subscriptions during vending.
The category group is a cost parameter, chosen per environment. Every environment sends audit through the intermediate root assignment; production also sends allLogs for data services and security-relevant resources through the assignment added at vending, which keeps ingestion cost in line with Chapter Ten.
Visibility must not become a new leak. By default, a workspace uses resource-context access: a person who can read a resource can read that resource's logs, without access to the whole workspace. Keep that default for workload teams. Grant workspace-wide access to the platform and security teams only, and use table-level access control where a table holds data a workload team should not see.
Logs are evidence only for as long as you keep them. Analytics retention can be extended up to two years per table, and total retention, including low-cost long-term retention, up to 12 years; data past its analytics period is retrieved with search jobs. Set retention per table to match the record-keeping period your regulators and auditors require. Where evidence must be tamper-proof, also export the critical tables to a storage account with an immutability policy. If security operations run Microsoft Sentinel on the workspace, write down the split: the platform team owns the pipes and the retention, the security team owns the detections and the incidents.
An alert that reaches nobody is only a log entry. Every alert rule has three things: a severity, an action group that names where it goes (on-call rotation, ticket queue, chat channel), and an owner who decides whether it is still useful. We keep the list small. A handful of platform alerts cover the estate: a policy assignment or role assignment changed at management group scope, a lock removed, a deletion in production, a diagnostic setting removed, a high-severity Defender alert, and Azure Service Health and Resource Health alerts for the regions and services the estate uses, so a platform incident or planned maintenance reaches the on-call rotation before users call. Workload teams own their own service alerts in their spokes.
A starter query for the "deletions in production" alert, run against the central workspace:
AzureActivity | where CategoryValue == "Administrative" and ActivityStatusValue == "Success" | where OperationNameValue endswith "/DELETE" | summarize deletes = count() by Caller, SubscriptionId, bin(TimeGenerated, 1h)
Azure Resource Graph answers questions about what exists across every subscription you can read, using a query language based on KQL. It needs nothing deployed and costs nothing to query, though queries are throttled. It also keeps the last 14 days of resource configuration changes, which is often enough to answer "what changed since Tuesday". We use it for the questions that a log workspace answers poorly: which resources have no owner tag, which storage accounts still allow public access, which subscriptions have no budget.
resources | where isnull(tags['owner']) or tostring(tags['owner']) == '' | summarize untagged = count() by subscriptionId, type | order by untagged desc
Each environment gets one workbook built on these queries and on the workspace: compliance from policy, secure score from Chapter Eight, open alerts, untagged resources and spend from Chapter Ten. That workbook is the page the operating review in Chapter Twelve opens first.
An incident review needed to know who changed a production firewall rule. The activity log showed the change, but resource logs for the firewall had never been switched on, so nobody could see which traffic the old rule had allowed. The fix was not a new tool. It was assigning the allLogs initiative at the intermediate root and running its remediation tasks, so the next review would have the record.
See it live: the governance map at hub.jcardena.com/azure/governance.html
The plain point: every euro or dollar the estate spends has an owner who expected it, a limit someone agreed to, and a record that adds up to the invoice. Cost is not a monthly surprise for finance to explain. It is a guarantee layer, governed by the same contracts as security.
In the series foundation, the contract has a budget clause: how much a door may spend, per run and per period, and what happens at the limit. On Azure the doors are subscriptions and resource groups, and the clause is written with tags, budgets, alerts and commitments. The slogan for this layer fits it exactly: every number adds up. A 3% error in a cost report is the kind of quiet failure that makes leaders stop trusting the whole platform.
Chapter Four gave each workload its own subscription per environment, which already answers most cost questions: the subscription is the bill line. Tags answer the rest. We require a short set, enforced by policy from Chapter Six and defined in the appendix tag dictionary: owner, costCenter, environment, workload and dataClassification. The vending process stamps them on the subscription and its resource groups. Cost Management can then group and filter spend by tag, and, on Enterprise Agreement and Microsoft Customer Agreement accounts, its tag inheritance setting can apply subscription and resource group tags to usage records, so a resource created without tags still lands on the right line.
Showback comes first: each owner sees their own spend, every month, in the same view. Chargeback, where the cost moves to a budget line, can follow once the numbers are trusted. Trying chargeback on untrusted numbers starts arguments, not savings.
Shared platform costs need a rule too: the hub, the firewall and the central workspace otherwise become the line nobody owns. On Enterprise Agreement and Microsoft Customer Agreement accounts, Cost Management cost allocation rules can split the cost of a shared subscription, resource group or tag across workload targets, by fixed percentages or in proportion to their own spend. Allocation changes what cost analysis, budgets and exports show, not the invoice, and it does not apply to purchases such as reservations and savings plans. For tools outside Azure, schedule Cost Management exports in the FOCUS format (FinOps Open Cost and Usage Specification), so finance can join Azure cost with other providers' data in one schema.
A budget in Cost Management can be set at management group, subscription or resource group scope (and at billing scopes, depending on the agreement type). It resets each month, quarter or year, and sends notifications when actual cost or forecasted cost crosses a percentage threshold. A single budget can carry up to five thresholds.
Two facts shape how we use them. First, a budget does not stop anything; Microsoft is explicit that resources are not affected and consumption continues. Second, for Enterprise Agreement and Microsoft Customer Agreement accounts, cost data typically arrives within 8 to 24 hours (pay-as-you-go can take up to 72), and budgets are evaluated about once a day, so a budget is an early warning, not a circuit breaker. If you need automation at a threshold, a budget at subscription or resource group scope can call an Azure Monitor action group, for example to shut down dev virtual machines.
Our standard: every subscription gets a budget at vending time, with a forecast alert at 100% and actual alerts at 80% and 100%, sent to the owner tag and the platform cost channel. The budget is code, deployed with the subscription:
targetScope = 'subscription'
param amount int
param startDate string // first day of a month, e.g. '2027-01-01'
param contactEmails array
resource budget 'Microsoft.Consumption/budgets@2023-05-01' = {
name: 'budget-monthly'
properties: {
category: 'Cost'
amount: amount
timeGrain: 'Monthly'
timePeriod: { startDate: startDate }
notifications: {
actual80: {
enabled: true
operator: 'GreaterThanOrEqualTo'
threshold: 80
thresholdType: 'Actual'
contactEmails: contactEmails
}
actual100: {
enabled: true
operator: 'GreaterThanOrEqualTo'
threshold: 100
thresholdType: 'Actual'
contactEmails: contactEmails
}
forecast100: {
enabled: true
operator: 'GreaterThan'
threshold: 100
thresholdType: 'Forecasted'
contactEmails: contactEmails
}
}
}
}
Budgets catch steady overspend. Anomalies catch the sudden spike: a scale setting left high, a test cluster that never stopped. Cost Management evaluates each subscription daily, comparing the day's usage with a forecast built from the previous 60 days, and runs about 36 hours after the end of the day so the data is complete. An anomaly alert rule sends an email once, at detection, with the resource groups that changed most.
Anomaly alert rules are created at subscription scope only, need Cost Management Contributor (or Contributor or Owner) on that subscription, and are limited to five per subscription. Alerts are sent using the current access of the rule's creator, so a rule created by a person whose role later expires under Privileged Identity Management (Chapter Five) goes silent. Microsoft's guidance for that case is to create the rule with a service principal through the Scheduled Actions API. We do exactly that, from the vending pipeline.
Azure offers two ways to commit for one or three years in exchange for lower rates. A reservation commits to a resource type and configuration in a region; for virtual machines, instance size flexibility lets the discount apply to other sizes in the same group. It saves the most when the workload is stable. A savings plan commits to a fixed hourly spend across eligible services and regions: compute, plus a separate savings plan for select database services; it suits workloads that are still evolving.
Commitments live in the billing hierarchy, which is not the management group tree. An Enterprise Agreement has an enrollment, departments and accounts; a Microsoft Customer Agreement has a billing account, billing profiles and invoice sections. Both sit beside the tree and are governed by billing roles, not Azure RBAC. Map them on purpose: departments or invoice sections to cost owners, and the right to buy commitments to the FinOps lead. Each reservation or savings plan also has a scope: a resource group, a subscription, a management group, or shared across the billing profile or enrollment. Shared scope gives the best utilization; a narrower scope fits when one business unit funds the purchase.
Microsoft's own recommended order is the one we follow: right-size first, exchange or trade in underused reservations, buy new reservations only for stable, well-understood workloads, and add savings plans last, sized to a clean baseline. In contract terms: commitments are a production decision, approved in the FinOps review, never bought to cover waste in dev.
| Rule | Dev | Test | Prod |
|---|---|---|---|
| Budget with forecast alert | Yes, tight | Yes | Yes |
| Anomaly alert rule | Yes | Yes | Yes |
| VM auto-shutdown outside hours | Default on | On, with opt-out | Off |
| Allowed SKUs (policy) | Small list | Prod-like list | Approved list |
| Reservations and savings plans | No | No | After review |
| Diagnostic log category (Chapter Nine) | audit | audit | audit, plus allLogs added at vending |
Tools find numbers; people decide. Once a month, the platform team, each workload owner and the FinOps lead look at the same view: spend against budget per subscription, anomalies and their causes, untagged spend, Azure Advisor cost recommendations, and commitment utilization. Each item ends with an owner and a date. Recurring causes become policy: if three teams left large dev clusters running, the allowed SKU list for dev gets shorter.
An estate had anomaly alerts on every subscription, yet a large spike went unnoticed for a week. The rules had been created by an engineer whose elevated role was time-bound. When the role expired, the alerts stopped being sent, with no error anywhere. Recreating the rules under a pipeline identity, and adding "alert rule creator still has access" to the monthly review, closed the gap.
See it live: the cost page at hub.jcardena.com/azure/governance-cost.html
The plain point: in production, nobody changes infrastructure by hand. Every change is code, reviewed by a person, previewed by the platform, deployed by a pipeline identity that has no password, and protected afterward so that the portal cannot quietly undo it. Here the model is the pull request: it proposes, and the contract decides.
Parts I to IV described what a governed estate looks like. Part V is about keeping it that way while dozens of teams change it every week. This chapter covers the door through which almost every change should arrive: the deployment pipeline. The next chapter covers the people and the rhythm that run the whole system.
Bicep and Terraform are both well supported on Azure. The contract does not care which you choose; it cares that you choose deliberately and do not mix them for the same resources. In a typical production estate, the platform layer (management groups, policy, hub network) and the workload layer may use different tools, but each resource has exactly one source of truth.
Do not write every resource from scratch. Azure Verified Modules (AVM) is a Microsoft initiative that sets one quality standard for infrastructure modules in Bicep and Terraform. Resource modules deploy a single resource with its common extensions, such as diagnostic settings, locks, role assignments and private endpoints; pattern modules deploy a reusable architecture. AVM states that it is owned by Azure engineering and supported by Microsoft. For Bicep, modules are published to the public registry and referenced by version:
param kvName string
// AVM resource module, pinned to a published version (current at the time of writing).
module kv 'br/public:avm/res/key-vault/vault:0.14.2' = {
name: 'kv-deploy'
params: {
name: kvName
enableRbacAuthorization: true
enablePurgeProtection: true
publicNetworkAccess: 'Disabled'
}
}
Pin versions and update them on purpose, through the same review as any other change. A module that floats to "latest" is a change nobody reviewed.
Chapter Five said no shared keys. Pipelines are where that rule is most often broken, because a service principal secret pasted into a pipeline variable works on day one and leaks on day four hundred. Workload identity federation removes the secret. The pipeline platform issues a short-lived token for a specific repository, branch or environment; Microsoft Entra ID trusts that issuer through a federated credential and exchanges the token for an Azure access token.
Azure DevOps now recommends workload identity federation for Azure Resource Manager service connections, with either an app registration or a user-assigned managed identity, and can convert existing secret-based connections. GitHub Actions uses the same mechanism through OpenID Connect with the Azure login action. Either way, our rules are the same:
A reviewer reading Bicep sees intent. A reviewer reading the what-if output sees effect: which resources will be created, modified or deleted, and which properties change. Azure Resource Manager provides the what-if operation at resource group, subscription, management group and tenant scope (az deployment group what-if and its siblings), and the CLI can return JSON with --no-pretty-print for a pipeline to inspect.
We run what-if on every pull request against the target environment and post the summary into the review. Two cautions from Microsoft's documentation keep the gate honest: what-if can report "noise", properties that appear to change but will not, and it cannot evaluate some expressions such as utcNow() or references to resources outside the template. Treat the output as evidence for a person, and fail the gate automatically only on clear signals, such as an unexpected delete in prod.
A deployment stack is an Azure resource that manages a group of resources as one unit. It records what it manages, decides what happens to resources removed from the template (detachAll, deleteResources or deleteAll), and can apply deny settings that block changes from everyone else. The modes are none, denyDelete and denyWriteAndDelete. Stacks can be created at resource group, subscription or management group scope, and two built-in roles control them: Azure Deployment Stack Contributor and Azure Deployment Stack Owner.
az deployment group what-if \ --resource-group rg-claims-prod \ --template-file main.bicep \ --parameters environment=prod az stack group create \ --name claims-prod \ --resource-group rg-claims-prod \ --template-file main.bicep \ --parameters environment=prod \ --action-on-unmanage detachAll \ --deny-settings-mode denyWriteAndDelete \ --deny-settings-excluded-principals "$EXCLUDED_GROUP_ID"
Two details matter. Deny settings apply only to the control plane, like the locks in Chapter Eight; they do not stop data plane operations such as writing a blob or a secret. And the excluded principals list accepts at most five entries, so follow Microsoft's recommendation and exclude a Microsoft Entra group that holds the pipeline identity, the break-glass administrators and the policy remediation identities. Forget the last one and your DeployIfNotExists policies from Chapters Seven and Nine will be refused on protected resources.
Policy definitions, initiatives, assignments and exemptions live in the same repository and pipeline as everything else. Each change is versioned and reviewed, and rollback is a redeploy of the previous commit. Before a policy or role change reaches the production tree, test it. Microsoft's landing zone guidance describes a canary approach: a duplicate management group hierarchy with its own subscriptions and its own pipeline identities, where changes are deployed first against sample workloads. Microsoft notes it is optional and suits organizations with strong change management. Smaller estates can rely on the staging from Chapter Six instead: DoNotEnforce first, then a narrow resource selector, then the full scope. Open-source tooling such as Enterprise Policy as Code (EPAC) or the Azure landing zone modules can handle the deployment mechanics.
Even with every control above, something will change outside the pipeline: an emergency fix, a portal click by someone with elevated access. We look for drift three ways. A scheduled what-if against each production stack reports any difference from code. Azure Resource Graph keeps 14 days of resource configuration changes for investigation. An activity log alert, from Chapter Nine, fires on write operations in prod whose caller is not a pipeline identity. Each finding is resolved one of two ways: the change is written back into code, or the code is redeployed over it.
An on-call engineer raised a database's capacity through the portal during an incident. The next routine deployment set it back, and the incident returned. The cause was not the engineer or the pipeline. It was a missing step: emergency changes were not written back into code. The team added the drift check and a rule that the incident is not closed until the pull request is merged.
See it live: the policy page at hub.jcardena.com/azure/governance-policy.html
The plain point: governance is not a set of settings you deploy once. It is a small team, a clear split of who decides what, a regular rhythm, and a one-page scorecard that tells leadership whether the estate is keeping its promises. Without those, every control in this book slowly decays.
Eleven chapters built the contracts: tenant, tree, subscriptions, roles, policy, network, posture, visibility, cost and deployment. This chapter answers the question every CIO asks at the end of a design review: who runs this, how often, and how will I know it is working? It also gives a 30-60-90 day plan for the case most readers actually have: not a clean new tenant, but an existing estate that grew without a plan.
The Azure landing zone model separates a platform team from workload teams. The platform team owns everything under the Platform management group from Chapter Three (identity, management, connectivity), the policy set from Chapter Six, the subscription vending process from Chapter Four and the pipelines that deploy them. Workload teams own what lives inside their landing zone subscriptions: their spoke, their services, their data, their alerts and their spend.
The boundary between them is the contract. Workload teams move fast inside it without asking permission. When they need something outside it, a new region, a public endpoint, a SKU not on the list, they ask through one door: an exemption or a change to the contract, recorded with an owner, a reason and an expiry date.
| Activity | Platform | Workload | Security | FinOps | Steering |
|---|---|---|---|---|---|
| Management groups and policy set | R/A | C | C | C | I |
| Subscription vending | R/A | C | I | C | I |
| Hub network, DNS, firewall | R/A | I | C | I | I |
| Resources in a landing zone | C | R/A | C | I | I |
| Posture findings in a landing zone | C | R | A | I | I |
| Budgets and commitments | R | C | I | A | I |
| Policy exemptions | R | C | A | C | I |
| Patching of workload machines | C | R/A | C | I | I |
| Changes to the contract itself | R | C | C | C | A |
Leaders do not need fifty dashboards. They need about ten numbers, each tied to a guarantee from this book, each with a target and a trend. Every number below can be computed from Azure Policy compliance data, Defender for Cloud, Cost Management, Azure Resource Graph or the central workspace.
| Layer | Measure | Source | Example target |
|---|---|---|---|
| Contracts | Policy compliance, prod scope | Azure Policy | Rising, set by steering |
| Contracts | Exemptions past expiry | Policy exemptions | Zero |
| Security | Secure score (model stated) | Defender for Cloud | Rising each month |
| Security | Standing privileged roles held by people | Entra ID, PIM | Emergency accounts only |
| Security | Prod workloads with tested restore this quarter | Review record | All |
| Visibility | Subscriptions sending activity logs centrally | Resource Graph | All |
| Visibility | Prod changes not made by a pipeline | Activity log | Each one explained |
| Cost | Subscriptions with budget and anomaly alert | Cost Management | All |
| Cost | Spend without owner tag | Cost analysis | Falling to near zero |
| Cost | Spend against budget, by owner | Cost Management | Within agreed range |
Most estates already have dozens of subscriptions, owners nobody remembers and a few public endpoints that "must stay". The order that works is the same every time: see first, fix second, enforce third. Turning on deny policies on day one breaks deployments and spends the trust you need for the next ninety days.
Three practices make the plan survive contact with a real estate. First, publish the baseline scorecard at day 30 even if it looks bad; a bad honest number is the starting point leaders need. Second, give every exception an expiry date, not a promise; the weekly review chases the dates. Third, move rules from audit to deny one at a time, starting with the ones that carry the most risk and break the fewest deployments, typically public network access on data services and allowed regions.
Microsoft renames services, adds policy definitions and changes defaults; this book noted several of those changes in passing. The contract keeps up because it has an owner and a review, not because someone remembers. Each quarter, steering reviews new built-in policies, retired features and the exemption list, and each change ships through the same pipeline as everything else.
See it live: the governance map at hub.jcardena.com/azure/governance.html
These templates are the book on one desk. Copy them, change the names, argue about the cells with your team, and keep the result under version control next to the code it governs. A template that nobody disagrees with has not been read.
Each template points back to the chapter that explains it. Where a cell names a built-in Azure role or policy, check the current name in Microsoft's documentation before you rely on it; names and defaults change, and the pattern is what matters.
The shape from Chapters Three and Four: a shallow tree, platform separated from workloads, one subscription per workload per environment. Replace the example workloads with your own.
From Chapter Five: assign to groups, not people; the lowest scope that works; time-bound elevation through Privileged Identity Management (PIM) for anything that can change production. "Eligible" means the role is activated through PIM with a reason and an expiry.
| Persona | Dev | Test | Prod |
|---|---|---|---|
| Workload developer | Contributor (eligible, no approval) | Reader; Contributor (eligible) | Reader; no write |
| Workload lead | Contributor (eligible) | Contributor (eligible) | Contributor (eligible, approval) |
| Pipeline identity (one per env) | Contributor on its sub | Contributor on its sub | Contributor on its sub |
| Application runtime | Managed identity with data roles only, for example Key Vault Secrets User | ||
| Platform engineer | Owner eligible at the Landing zones management group; separate eligible roles at the Platform management group or its subscriptions, least privilege (approval required, at least two approvers configured) | ||
| Access administrator | Role Based Access Control Administrator (eligible, with conditions limiting which roles it may assign) | ||
| Security team | Security Reader standing; Security Admin (eligible) | ||
| FinOps lead | Cost Management Reader standing; Cost Management Contributor eligible for budget changes; budgets and anomaly alert rules are created by the vending pipeline identity (Chapter Ten) | ||
| Auditor | Reader, time-bound access review | ||
| Emergency access accounts | Global Administrator in Microsoft Entra ID, used only in emergencies as Chapter Two describes; every sign-in raises an alert | ||
Pipelines that also assign roles or deploy deployment stacks with deny settings need more than Contributor. Grant exactly that (for example a constrained Role Based Access Control Administrator assignment, or Azure Deployment Stack Owner) and record why.
From Chapters Six to Ten. The guardrails are the same for dev, test and prod. Deny rules are assigned once at the Landing zones management group; Modify, DeployIfNotExists and audit baselines are assigned at the intermediate root, so platform subscriptions are covered too (Chapters Six and Nine). The only deliberately looser set is Sandbox. For an existing estate, every Deny row starts in Audit (or with enforcement set to DoNotEnforce) through the see and fix phases of the 30-60-90 plan (Chapter Twelve), then switches to the target effect on a date on the calendar. DINE means DeployIfNotExists.
| Rule (intent) | Built-in starting point | Sandbox | Landing zones: dev, test and prod (target) |
|---|---|---|---|
| Resources only in approved regions | Allowed locations | Deny | Deny |
| Required tags present | Require a tag on resources | Audit | Deny |
| Tags inherited from subscription | Inherit a tag from the subscription if missing | Modify | Modify |
| Block risky resource types | Not allowed resource types | Audit | Deny |
| Approved VM sizes | Allowed virtual machine size SKUs | Audit | Deny, assigned per subscription at vending with an environment list |
| Every workload subnet has a network security group (special subnets such as GatewaySubnet and AzureFirewallSubnet excepted) | Subnets should be associated with a Network Security Group | AuditIfNotExists | AuditIfNotExists |
| Public web apps behind a WAF | WAF built-ins for Front Door and Application Gateway | Not assigned | Audit, then Deny (Online) |
| Production VMs backed up | Azure Backup should be enabled for Virtual Machines | Not assigned | AuditIfNotExists; configure at prod subscriptions |
| No public IPs on VM NICs | Network interfaces should not have public IPs | Audit | Deny |
| Public network access off on data services | Per service, built-in where available | Audit | Deny |
No privatelink DNS zones in spokes | Custom or landing zone reference | Not assigned | Deny |
| Private endpoint DNS records | Configure Azure PaaS services to use private DNS zones (landing zone initiative) | Not assigned | DINE |
| Resource logs to central workspace | Enable audit or allLogs category group resource logging to Log Analytics | DINE (audit) | DINE (audit at the intermediate root; allLogs added at production subscriptions during vending) |
| Defender for Cloud plans on | Defender for Cloud configuration policies | Foundational | Plans per Chapter Eight |
| Key Vault uses Azure RBAC and purge protection | Key Vault built-ins | Audit | Deny |
Every exemption from this table carries an owner, a reason, a category (waiver or mitigated) and an expiry date. Expired exemptions appear on the scorecard.
From Chapters Four and Ten. Keep it short; every extra required tag is friction. Values come from controlled lists wherever possible.
| Tag | Meaning | Example value | Required on | Enforced by |
|---|---|---|---|---|
owner | Accountable group or role, not a person's name | claims-platform-team | Subscription, resource group | Policy deny + inheritance |
costCenter | Finance code that pays | CC-4410 | Subscription, resource group | Policy deny + inheritance |
environment | dev, test, prod or sandbox | prod | Subscription, resource group | Vending + policy |
workload | Short workload name | claims | Subscription, resource group | Vending |
dataClassification | Highest sensitivity held: public, internal, confidential or restricted | confidential | Subscription, resource group, and resources holding data | Policy audit first, then deny |
rpoRto | Recovery targets agreed with the owner | RPO 15m / RTO 4h | Prod subscription | Review (Chapter Eight) |
expiresOn | Planned end date for temporary resources | 2027-03-31 | Sandbox, experiments | Policy audit + cleanup job |
Use this before you declare a landing zone ready for its first production workload. Every item maps to a chapter; a "no" is a finding with an owner and a date, not a blocker by default.
privatelink zones in place; egress logged (Chapter Seven).See it live: the landing zone map at hub.jcardena.com/azure/governance-landing-zone.html
GDCD on Azure applies Governance-Driven Contract Design to one platform, end to end. The first book governs the estate. The second delivers AI on top of it.
The foundation of the method is The Contract Decides: Governing AI at Every Door, Book 1 of the GDCD Field Guides. See every Azure service, model and region in the live diagrams at hub.jcardena.com/azure. All books are free at blog.jcardena.com/en/ebooks.
Download the latest edition at blog.jcardena.com/en/ebooks/governing-azure-by-contract. See it live at hub.jcardena.com/azure.
GDCD on Azure · Book 1 · Edition 1.1 · Trust, earned at every layer.