Resource Groups - Do you know how to arrange your Azure resources?

Last updated by Github-actions[bot] about 1 year ago.See history

icon naming azure 1710232021931

Naming your Resource Groups

Resource Groups should be logical containers for your products. They should be a one-stop shop where a developer or sysadmin can see all resources being used for a given product, within a given environment (dev/test/prod). Keep your Resource Group names consistent across your business, and have them identify exactly what's contained within them.

Name your Resource Groups as Product.Environment. For example:

  • Northwind.Dev
  • Northwind.Staging
  • Northwind.Production

There are no cost benefits in consolidating Resource Groups, so use them! Have a Resource Group per product, per environment. And most importantly, be consistent in your naming convention.

Remember it's difficult to change a resource group name once everything is deployed without downtime.

Keep your resources in logical, consistent locations

You should keep all a product's resources within the same Resource Group. Your developers can then find all associated resources quickly and easily, and helps minimize the risk of duplicate resources being created. It should be clear what resources are being used in the Dev environment vs. the Production environment, and Resource Groups are the best way to manage this.

rogue resource
Figure: Bad example - A rogue dev resource in the Production RG

Don't mix environments

There's nothing worse than opening up a Resource Group and finding several instances of the same resources, with no idea what resources are in dev/staging/production. Similarly, if you find a single instance of a Notification Hub, how do you know if it's being built in the test environment, or a legacy resource needed in production?

bad azure environments
Figure: Bad example - Staging and Prod resources in the same RG

Don't categorize Resource Groups based on resource type

There is no inherent cost-saving benefit to grouping resources of the same type together unless they share underlying infrastructure. For example, consolidating all databases into a single SQL Server can reduce costs, as can hosting multiple apps under a single App Service Plan. However, arbitrarily placing all resources of the same type in one location—without considering dependencies—does not save money. Instead, it is best to provision resources in the same resource group as the applications that use them for better management and alignment with their lifecycle.

arrange azure resources bad
Figure: Bad example - SSW.SQL has all the Databases for different apps in one place

rg good
Figure: Good example (for all the above) - Resource Group contains all staging resources for this product

screenshot 2025 03 18 080729
Figure: Good example - Adding underlying infrastructure to the same Resource Group can save $


We open source.Loving SSW Rules? Star us on GitHub. Star
Stand by... we're migrating this site to TinaCMS