azureblog.co.uk
← AZ-104 study plan
AZ-104 · Manage Azure identities and governance

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. 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. audit flags non-compliance, deny blocks it, modify changes properties such as tags, and deployIfNotExists deploys 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. 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. 3

    Apply and manage tags on resources

    Tags are name and value pairs, such as CostCentre: 4410 or Environment: 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. 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. 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. 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. 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?

NeedUseWhat it does
Stop resources being created in the wrong regionAzure Policy (deny)Blocks non-compliant deployments
Stop a production database being deleted by mistakeCanNotDelete lockBlocks delete for everyone until removed
Show costs by departmentTags + Cost ManagementGroup and filter spending by tag value
Warn when spend reaches 80% of planBudget with an alertEmails or triggers an action group
Apply the same rules to 30 subscriptionsManagement groupAssignments 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.

  1. You must block storage accounts being created outside UK South. What should you use?

  2. Which lock still lets people change a resource's settings?

  3. Resources in a resource group don't have the group's tags. Why?

  4. What does a budget do when spending passes its threshold?

  5. Where should you assign a policy so it applies to every current and future subscription in a business unit?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.