What Are Resource Groups?
A Resource Group is a logical container that holds related Azure resources. Think of it as a folder — you put related files (resources) in the same folder (Resource Group) so you can manage them together.
Every Azure resource — without exception — must belong to exactly one Resource Group. You cannot create a VM, storage account, or any other resource without first assigning it to a group.
Key Rules & Constraints
Understanding these rules is critical — they come up on the AZ-900 exam:
| Rule | Detail |
|---|---|
| One group per resource | Every resource belongs to exactly one Resource Group |
| Can't be nested | Resource Groups cannot contain other Resource Groups |
| Resources can span regions | Resources in a group don't have to be in the same region |
| Resources can be moved | Most (not all) resources can be moved between Resource Groups |
| Deletion cascades | Deleting a Resource Group deletes all resources inside it |
| No cost for the group itself | Resource Groups are free — you only pay for the resources inside |
How to Organise Resources
There's no single right answer — the best organisation depends on your team and workloads. Here are the most common patterns:
By Environment (Most Common)
Separate Resource Groups for dev, test/staging, and production. This is the most popular pattern because it keeps environments clean and makes it easy to delete a whole dev environment at once.
rg-webapp-devrg-webapp-stagingrg-webapp-prod
By Application
All resources for a specific application in one group, regardless of environment. Works well for smaller teams with one or two apps.
rg-webapprg-api-servicerg-data-pipeline
By Department / Team
Organise by the team that owns the resources. Makes cost allocation and access management simple.
rg-engineeringrg-marketingrg-finance
By Region
Separate groups for different deployment regions. Useful for geo-distributed applications.
rg-webapp-centralindiarg-webapp-southindia
rg-[workload]-[environment]-[region]Examples:
rg-ecommerce-prod-centralindia, rg-api-dev-eastusConsistent naming makes filtering and searching much faster as your subscription grows.
Resource Group Region vs Resource Region
When you create a Resource Group, you choose a region for it. This can be confusing — here's what it actually means:
The Resource Group's region is where the Resource Group's metadata is stored — not where the resources live. The actual resources inside can be in any region.
Tags — Metadata for Cost Tracking
Tags are name-value pairs you attach to Resource Groups (and individual resources) to add metadata. Tags don't affect functionality — they help you organise, filter, and track costs.
| Tag Name | Tag Value | Purpose |
|---|---|---|
| Environment | Production | Filter prod vs dev resources |
| Department | Engineering | Cost allocation by team |
| Project | RedKiteCloud | Track spending per project |
| Owner | john@company.com | Know who to contact |
| CostCenter | CC-1042 | Map to finance cost centre |
az group create \
--name rg-webapp-prod \
--location centralindia \
--tags Environment=Production Department=Engineering Project=WebApp
Access Control on Resource Groups
Azure uses Role-Based Access Control (RBAC) to manage who can do what. You can assign roles at the Resource Group level — and those permissions automatically apply to all resources inside the group.
| Role | Can Do |
|---|---|
| Owner | Full access — can manage resources and assign roles to others |
| Contributor | Can create and manage resources — cannot assign roles |
| Reader | Can view resources — cannot make any changes |
| User Access Administrator | Can manage user access — cannot manage resources |
rg-webapp-dev so they can create and manage dev resources freely. Give them Reader access on rg-webapp-prod so they can view production but never accidentally change it.
Resource Group Lifecycle
One of the most powerful features of Resource Groups is lifecycle management. When you're done with a project, environment, or experiment — delete the Resource Group and everything inside is cleaned up in one action.
# Delete entire resource group (and everything inside)
az group delete --name rg-webapp-dev --yes --no-wait
Creating Resource Groups
az group create \
--name rg-myproject-prod \
--location centralindia
New-AzResourceGroup -Name "rg-myproject-prod" -Location "centralindia"
Best Practices
- One environment per group — Never mix dev and prod resources in the same group
- Consistent naming — Use
rg-[workload]-[env]-[region]across your organisation - Always use tags — At minimum: Environment, Owner, and Project
- Apply locks to production groups — CanNotDelete lock on all prod resource groups
- Group by lifecycle — Resources deleted together should live together
- Keep shared services separate — Networking, DNS, and shared VMs often go in a dedicated
rg-shared-infragroup