Lesson 1 of 5 Governance Solutions

Understanding the Azure Resource Hierarchy

This lesson explains management groups, subscriptions, resource groups and inheritance.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the four levels of the hierarchy.
  • Explain what inherits and what does not.
  • Identify when to create a separate subscription.

The four levels

Azure organizes resources in a four-level hierarchy. Management groups group subscriptions for shared governance. Subscriptions are containers with their own billing, quotas and access boundary. Resource groups hold resources that share a lifecycle. Resources are the individual services, such as a storage account.

The hierarchy matters because of inheritance. Azure Policy assignments and Azure RBAC role assignments made at a higher level apply to everything beneath. Governance is therefore achieved by placing controls at the highest level that applies, so that they are set once and cannot be forgotten. A tag, by contrast, is not inherited by resources unless a policy copies it, which surprises many learners.

Management groups

Each tenant has one root management group, under which all others sit. A single directory can support 10,000 management groups, and a tree can have six levels of depth, not counting the root or the subscription level. A subscription or management group has exactly one parent, so the hierarchy is a strict tree.

Technical limits do not define good design. Microsoft recommends a reasonably flat hierarchy, ideally no more than three or four levels, because each level adds complexity. The hierarchy should group subscriptions by shared policy needs, not by organization chart or environment. Microsoft specifically advises against creating management groups for production, testing and development, since those usually need the same control framework and differ mainly at subscription level.

True or false

Management group design

Exam skills 1.3.1

Check the rules and guidance for management groups.

Log in to try this activity Interactive activities are free with an account.

Subscriptions

A subscription is the primary unit of scale, management and billing. Each has quotas and limits, so a large workload may need its own. Each subscription also produces a separate invoice breakdown and forms a strong access boundary. The Cloud Adoption Framework therefore recommends using subscriptions as units of management, and generally treats one workload, or one workload environment, as a subscription, known as subscription democratization.

Several situations call for separate subscriptions: production and non-production environments with different policies, workloads reaching resource limits, separate billing or ownership, and regulatory isolation. Moving resources between subscriptions is possible for many resource types, but not all, and it can involve downtime, so early design decisions have a lasting effect.

Resource groups

A resource group is a logical container whose resources should share a lifecycle: deployed, updated and deleted together. A resource belongs to one group. A resource group has a location that stores its metadata, but it can contain resources from other regions. Deleting a group deletes all of its resources, so unrelated resources should not share one.

Resource groups also give a useful scope for access and cost. A web application with its database could form one group, whereas a shared virtual network used by many applications should be in another, because its lifecycle is different.

Scenario questions

Grouping resources

Exam skills 1.3.1

Apply the shared-lifecycle rule to resource groups.

Log in to try this activity Interactive activities are free with an account.

How the levels compare

The following table recaps what each level provides, which helps when deciding where a control should go.

LevelPrimary purposeInherited downTypical design rule
Management groupShared governance over subscriptionsPolicy and RBACGroup by required controls; keep flat
SubscriptionBilling, quota and access boundaryPolicy and RBACSeparate by workload, environment and ownership
Resource groupShared lifecyclePolicy and RBACGroup what is deployed and deleted together
ResourceThe service itselfNot applicableName and tag consistently

The following diagram places the policy and the role assignment at their scopes.

Placing two controls at the right scopes. The approved-regions rule applies to every subscription now and next year, so it is an Azure Policy assignment at a management group above them, inherited by new subscriptions. The finance team's access is narrow, so it is an Azure RBAC assignment on the finance resource group only.
Only some of the 25 subscriptions are drawn.
Worked example

Placing a control

A company has 25 subscriptions. All must prevent creating resources outside two approved regions, and any subscription added next year must be covered automatically. Only the finance application team may administer the finance resource group. Where should each control be placed?

The region rule applies to all subscriptions, now and in the future. It should therefore be an Azure Policy assignment at a management group above them, so that new subscriptions placed under that group inherit it.

The finance team's access is narrow and should be an Azure RBAC assignment at the finance resource group. Assigning the policy to each subscription would work today but leaves gaps for new ones, while assigning the finance role at subscription level would grant more than the team needs.

Check yourself

A tag is added to a resource group. Do the resources in the group receive it?

Show answer

No. Resources do not inherit tags, unless a policy copies them.

Exam Tips

Remember for the exam

  • Policy and RBAC inherit downward; tags do not inherit to resources by default.
  • Up to six management group levels, but keep to three or four.
  • Do not build management groups around production, test and development.
  • Resources in a resource group should share a lifecycle.