Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 3.64 KB

File metadata and controls

74 lines (56 loc) · 3.64 KB
type title seoDescription uri authors related redirects created archivedreason guid
rule
Resource Groups - Do you know how to arrange your Azure resources?
Learn how to effectively organize your Azure resources using logical resource groups named consistently across environments for clarity and efficiency.
azure-naming-resource-groups
azure-naming-resources
do-you-know-how-to-arrange-your-azure-resources
how-to-arrange-your-azure-resources
2020-06-02 20:48:06 UTC
2c2f55d2-66fd-4c29-a7cb-6598c54b60df

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.

::: bad 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 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.

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

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

::: good Figure: Adding underlying infrastructure to the same Resource Group can save $ :::