Skip to main content

Resource Group

An Azure resource group is a logical container for related resources that share a lifecycle, such as the VMs, databases, and storage of one application. Deleting a resource group deletes everything inside it.

Resource Group

A resource group stores metadata about its resources in a chosen location, but the resources inside can be in any region. Every resource belongs to exactly one resource group, and you can move many resource types between groups. RBAC role assignments made at the group scope are inherited by its resources, which makes the group a natural unit for access and cleanup.

Do Tags Cascade From a Resource Group?

No. Role assignments and locks inherit downward, but tags do not. Use an Azure Policy with the Modify effect to copy a group's tags onto its resources.

How Do You Create and Protect One?

Bash
az group create --name mumbai-orders-prod-rg --location centralindia \
--tags environment=prod team=orders
# Prevent accidental deletion
az lock create --name no-delete --lock-type CanNotDelete \
--resource-group mumbai-orders-prod-rg

How Should You Organise Resource Groups?

Group resources that are deployed, updated, and deleted together. A common pattern is one group per application and environment, such as orders-prod-rg and orders-dev-rg.

Why It Matters in Production

A platform team at a company like Swiggy can give each microservice its own resource group, so a team can rebuild or tear down its stack without touching another team's resources.

Common Mistake

Putting dev, staging, and production in one flat group. A cleanup of a dev experiment can delete production, and access given to a contractor covers too much.

Remember

A resource group is organisational, not a network or security boundary. Resources in different groups can still talk to each other.

Frequently Asked Questions

Can a resource group contain resources from multiple regions?

Yes. The group's location only affects where its metadata is stored, and its resources can be deployed to any region.

What happens when I delete a resource group?

Every resource inside is deleted. Resource locks can block the deletion, and some resources such as Key Vaults stay recoverable under soft delete.

Can a resource be in two resource groups?

No. A resource belongs to exactly one group at a time, although you can move it to another group.

Found a mistake, an outdated step or a broken link?