Manage Azure subscriptions and governance
Keep Azure organised and under control with management groups, subscriptions, resource groups, tags, Azure Policy, resource locks, budgets and Azure Advisor.
- 22 min
- 7 concepts
- Try it yourself
- 5-question check
Learn
Governance is how you stop Azure turning into an expensive mess. You organise resources into a hierarchy, enforce rules with Azure Policy, protect important resources with locks, label everything with tags, and keep an eye on spending with budgets and Azure Advisor.
Most of this works through inheritance: set something once at a high level and it applies everywhere below.
- 1
Implement and manage Azure Policy
A policy definition describes a rule, such as 'storage accounts must not allow public blob access'. Group related definitions into an initiative. Assign a definition or initiative to a management group, subscription or resource group, optionally with exclusions.
Each definition has an effect.
auditflags non-compliance,denyblocks it,modifychanges properties such as tags, anddeployIfNotExistsdeploys a related resource. Policy checks new and updated resources at deployment and evaluates existing ones on a regular cycle.Remember: RBAC controls what people can do. Policy controls what resources are allowed to look like.
- 2
Configure resource locks
A CanNotDelete lock lets authorised users read and change a resource but not delete it. A ReadOnly lock stops changes and deletion. Locks apply to everyone, including Owners, until someone with permission removes the lock.
Locks are inherited from a subscription or resource group. ReadOnly can have side effects: listing storage account keys is a POST request, so a ReadOnly lock blocks it.
Remember: Locks protect against accidents, not attackers with Owner rights, who can remove them.
- 3
Apply and manage tags on resources
Tags are name and value pairs, such as
CostCentre: 4410orEnvironment: Production. Use them to group costs, find resources and drive automation.Resources don't inherit tags from their resource group or subscription by default. Use Azure Policy, for example the built-in 'Inherit a tag from the resource group if missing' definition with the modify effect, to apply them consistently.
Remember: Tag names aren't case-sensitive for operations, and not every resource type supports tags.
- 4
Manage resource groups
A resource group is a container for resources that share a lifecycle. Every resource belongs to exactly one group. A group's location only stores its metadata; the resources inside can be in any region.
Deleting a resource group deletes everything in it. You can move resources between groups and subscriptions, though some resource types have restrictions.
Remember: Resource groups can't be nested.
- 5
Manage subscriptions
A subscription is a billing boundary and a scale and access boundary. It trusts one Microsoft Entra tenant for identities. Organisations often use separate subscriptions for production, development and different business units.
You can move a subscription to a different management group, rename it, and transfer billing ownership. Subscriptions have limits and quotas, such as vCPUs per region, that you can request to increase.
Remember: Use subscriptions to separate billing and to isolate workloads with different access needs.
- 6
Manage costs by using alerts, budgets, and Azure Advisor recommendations
Microsoft Cost Management shows where the money goes. A budget sets an amount for a scope and sends alerts when actual or forecast spend crosses thresholds you choose. A budget alerts; it doesn't stop resources.
Azure Advisor gives cost recommendations such as resizing or shutting down underused VMs and buying reservations, alongside reliability, security, performance and operational recommendations.
Remember: Budgets can trigger an action group, which can run automation if you want resources stopped.
- 7
Configure management groups
Management groups sit above subscriptions so you can apply policy and RBAC to many subscriptions at once. Every tenant has a single root management group, and management groups can be nested up to six levels deep (not counting the root and subscriptions).
A subscription belongs to one management group at a time. Moving it changes which policies and role assignments it inherits.
Remember: Assign baseline policies at a high management group so new subscriptions get them automatically.
Which tool does which job?
| Need | Use | What it does |
|---|---|---|
| Stop resources being created in the wrong region | Azure Policy (deny) | Blocks non-compliant deployments |
| Stop a production database being deleted by mistake | CanNotDelete lock | Blocks delete for everyone until removed |
| Show costs by department | Tags + Cost Management | Group and filter spending by tag value |
| Warn when spend reaches 80% of plan | Budget with an alert | Emails or triggers an action group |
| Apply the same rules to 30 subscriptions | Management group | Assignments are inherited by every subscription below |
Try it
A policy says every storage account needs a CostCentre tag. Pick an effect to see what happens to a new account without the tag and to one that already exists.
This interactive part needs JavaScript.
In the portal
- Assign a policyAzure portal: Policy > Assignments > Assign policy
- Fix existing resourcesAzure portal: Policy > Remediation > Create remediation task
- Add a lockAzure portal: any resource > Settings > Locks > Add
- Create a budgetAzure portal: Cost Management > Budgets > Add
- Management groupsAzure portal: Management groups > Create
Key terms
Click a card to see the definition.
Check your understanding
5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.
You must block storage accounts being created outside UK South. What should you use?
Policy with deny blocks non-compliant deployments. RBAC can't restrict properties like location.
Which lock still lets people change a resource's settings?
CanNotDelete blocks only deletion. ReadOnly blocks changes too.
Resources in a resource group don't have the group's tags. Why?
Tag inheritance needs Azure Policy, for example with the modify effect.
What does a budget do when spending passes its threshold?
Budgets alert. Stopping resources would need automation triggered from an action group.
Where should you assign a policy so it applies to every current and future subscription in a business unit?
Subscriptions under a management group inherit its policy assignments.
Sources
- Microsoft Learn: What is Azure Policy?
- Microsoft Learn: Azure Policy definitions effect basics
- Microsoft Learn: Lock your resources to protect your infrastructure
- Microsoft Learn: Use tags to organize your Azure resources
- Microsoft Learn: What are Azure management groups?
- Microsoft Learn: Tutorial: Create and manage budgets
Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.