An effective naming convention consists of resource names from important information about each resource. A good name helps you quickly identify the resource’s type, associated workload, environment, and the Azure region hosting it. For example, a public IP resource for a production SharePoint workload in the West US region might be pip-sharepoint-prod-westus-001
.
Diagram 1: Components of an Azure resource name.
Recommended naming components
When you construct your naming convention, identify the key pieces of information you want to reflect in a resource name. Different information is relevant for different resource types, and not all established naming components can be used for each resource type. The intention is to have a standard naming convention for your environment that is easy to follow, concise, and useful for recognizing information that’s relevant to the deployed resource.
The following list provides examples of naming components that are useful when you construct resource names:
Naming component | Description |
---|---|
Organization | Top-level name of organization, normally utilized as top management group or, in smaller organizations, part of the naming convention. Example: contoso |
Business unit or department | Top-level division of your company that owns the subscription or workload the resource belongs to. In smaller organizations, this component might represent a single corporate top-level organizational element. Examples: fin , mktg , product , it , corp |
Resource type | An abbreviation that represents the type of Azure resource or asset. This component often is used as a prefix or suffix in the name. For more information, see Recommended abbreviations for Azure resource types. Examples: rg , vm |
Project, application, or service name | Name of a project, application, or service that the resource is a part of. Examples: navigator , emissions , sharepoint , hadoop |
Environment | The stage of the development lifecycle for the workload that the resource supports. Examples: prod , dev , qa , stage , test |
Location | The region or cloud provider where the resource is deployed. Examples: westus , eastus2 , westeu , usva , ustx |
VM role | Identifier for the purpose of the VM. Examples: db (database), ws (web server), ps (print server) |
Instance | The instance count for a specific resource to identify more than one resource that has the same naming convention. Examples, 01 , 001 |
Note
Although virtual machine (VM) names in Azure can be longer than the allowed NetBIOS name of the VM, we recommend that you keep them consistent. For more information and for other restrictions, see Computer names.
Naming considerations
In addition to defining the naming components, you must also consider the order in which the naming components should be listed, if and what type of delimiters you should use between components, and take into account the different naming rules associated with resources types.
Scope
All Azure resource types have a scope that defines the level of that resource and that the resource names must be unique. A resource must have a unique name within its scope.
For example, a virtual network has a resource group scope, which means that there can be only one network named vnet-prod-westus-001
in a given resource group. Other resource groups could have their own virtual network named vnet-prod-westus-001
. Subnets are scoped to virtual networks, so each subnet within a virtual network must have a distinct name.
Some resource names, such as PaaS services with public endpoints or virtual machine DNS labels, have global scopes, so they must be unique across the entire Azure platform.
Diagram 2: Scope levels for Azure resource names.
Azure naming rules
Azure naming rules vary depending on the resource type. When you define a naming convention, it’s important to understand Azure naming rules for the resource type to avoid confusion and delay deployments.
For example, resource names have length limits. We recommend that you keep the length of naming components short to prevent exceeding resource name length limits.
Note
Balancing the context of a name with its scope and name length limit is important when you develop your naming conventions. For more information, see Naming rules and restrictions for Azure resources.
When you construct your naming convention, identify the key pieces of information that you want to reflect in a resource name. Different information is relevant for different resource types. The following list provides examples of information that’s useful when you construct resource names.
You can abbreviate resource names and naming components as a strategy to reduce the length and complexity of resource names. Shortening names can be useful for any of the naming components, but it’s especially important to help you keep resource names within name length limits. For example, a VM name in Azure can be longer than the OS naming restrictions. Keeping Azure VM names shorter than the naming restrictions of the OS helps create consistency, improve communication when discussing resources, and reduce confusion when you are working in the Azure portal while being signed in to the VM itself.
Naming component | Description |
---|---|
Resource type | An abbreviation that represents the type of Azure resource or asset. This component is often used as a prefix or suffix in the name. For more information, see Recommended abbreviations for Azure resource types. Examples: rg , vm |
Business unit | Top-level division of your company that owns the subscription or workload the resource belongs to. In smaller organizations, this component might represent a single corporate top-level organizational element. Examples: fin , mktg , product , it , corp |
Application or service name | Name of the application, workload, or service that the resource is a part of. Examples: navigator , emissions , sharepoint , hadoop |
Subscription purpose | Summary description of the purpose of the subscription that contains the resource. Often broken down by environment or specific workloads. Examples: prod , shared , client |
Environment | The stage of the development lifecycle for the workload that the resource supports. Examples: prod , dev , qa , stage , test |
Region | The Azure region where the resource is deployed. Examples: westus , eastus2 , westeu , usva , ustx |
Note
When you’re ready to name your resources and assets, review Recommended abbreviations for Azure resource types.
The following section provides example names for common Azure resource types in an enterprise cloud deployment.
Note
Some of these example names use a three-digit padding scheme (###
), such as mktg-prod-001
.
Padding improves readability and sorting of assets when those assets are managed in a configuration management database (CMDB), IT Asset Management tool, or traditional accounting tools. When the deployed asset is managed centrally as part of a larger inventory or portfolio of IT assets, the padding approach aligns with interfaces those systems use to manage inventory naming.
Unfortunately, the traditional asset padding approach can prove problematic in infrastructure-as-code approaches that might iterate through assets based on a non-padded number. This approach is common during deployment or automated configuration management tasks. Those scripts would have to routinely strip the padding and convert the padded number to a real number, which slows script development and run time.
Choose an approach that’s suitable for your organization. The padding shown here illustrates the importance of using a consistent approach to inventory numbering, rather than showing which approach is superior. Before choosing a numbering scheme, with or without padding, evaluate what will affect long-term operations more, CMDB and asset management solutions or code-based inventory management. Then, consistently follow the padding option that best fits your operational needs.
The following section provides some example names for common Azure resource types in an enterprise cloud deployment. For additional examples, see the Azure Naming Tool and the Naming and tagging tracking template.
Note
The following examples are intended to provide visualization of a naming convention, but actual conventions will vary by organization.
Example names: General
Asset type | Scope | Format and examples |
---|---|---|
Management group | Business unit and/or environment | mg-<business unit>[-<environment>]mg-mktg mg-hr mg-corp-prod mg-fin-client |
Subscription | Account / enterprise agreement | <business unit>-<subscription purpose>-<###>mktg-prod-001 corp-shared-001 fin-client-001 |
Resource group | Subscription | rg-<app or service name>-<subscription purpose>-<###>rg-mktgsharepoint-prod-001 rg-acctlookupsvc-shared-001 rg-ad-dir-services-shared-001 |
API management service instance | Global | apim-<app or service name>apim-navigator-prod |
Managed identity | Resource group | id-<app or service name>-<environment>-<region name>-<###>id-appcn-keda-prod-eastus2-001 |
Example names: Networking
Asset type | Scope | Format and examples |
---|---|---|
Virtual network | Resource group | vnet-<subscription purpose>-<region>-<###>vnet-shared-eastus2-001 vnet-prod-westus-001 vnet-client-eastus2-001 |
Subnet | Virtual network | snet-<subscription purpose>-<region>-<###>snet-shared-eastus2-001 snet-prod-westus-001 snet-client-eastus2-001 |
Network interface (NIC) | Resource group | nic-<##>-<vm name>-<subscription purpose>-<###>nic-01-dc1-shared-001 nic-02-vmhadoop1-prod-001 nic-02-vmtest1-client-001 |
Public IP address | Resource group | pip-<vm name or app name>-<environment>-<region>-<###>pip-dc1-shared-eastus2-001 pip-hadoop-prod-westus-001 |
Load balancer | Resource group | lb-<app name or role>-<environment>-<###>lb-navigator-prod-001 lb-sharepoint-dev-001 |
Network security group (NSG) | Subnet or NIC | nsg-<policy name or app name>-<###>nsg-weballow-001 nsg-rdpallow-001 nsg-sqlallow-001 nsg-dnsblocked-001 |
Local network gateway | Virtual gateway | lgw-<subscription purpose>-<region>-<###>lgw-shared-eastus2-001 lgw-prod-westus-001 lgw-client-eastus2-001 |
Virtual network gateway | Virtual network | vgw-<subscription purpose>-<region>-<###>vgw-shared-eastus2-001 vgw-prod-westus-001 vgw-client-eastus2-001 |
Site-to-Site connection | Resource group | cn-<local gateway name>-to-<virtual gateway name>cn-lgw-shared-eastus2-001-to-vgw-shared-eastus2-001 cn-lgw-shared-eastus2-001-to-vgw-shared-westus-001 |
VPN connection | Resource group | cn-<subscription1 purpose>>-<region1>-to-<subscription2 purpose>>-<region2>-cn-shared-eastus2-to-shared-westus cn-prod-eastus2-to-prod-westus |
Route table | Resource group | route-<route table name>route-navigator route-sharepoint |
DNS label | Global | <DNS A record for VM>.<region>.cloudapp.azure.comdc1.westus.cloudapp.azure.com web1.eastus2.cloudapp.azure.com |
Example names: Compute and Web
Asset type | Scope | Format and examples |
---|---|---|
Virtual machine | Resource group | vm<vm role><environment><###>vmsqltest001 vmhadoopprod001 |
Web app | Global | app-<project, app or service>-<environment>-<###>.azurewebsites.netapp-navigator-prod-001.azurewebsites.net app-accountlookup-dev-001.azurewebsites.net |
Function app | Global | func-<project, app or service>-<environment>-<###>.azurewebsites.netfunc-navigator-prod-001.azurewebsites.net func-accountlookup-dev-001.azurewebsites.net |
Example names: Databases
Asset type | Scope | Format and examples |
---|---|---|
Azure SQL database | Azure SQL Database | sqldb-<project, app or service>-<environment>sqldb-users-prod sqldb-users-dev |
Azure Cosmos DB database | Global | cosmos-<project, app or service>-<environment>cosmos-navigator-prod cosmos-emissions-dev |
Azure Cache for Redis instance | Global | redis-<project, app or service>-<environment>redis-navigator-prod redis-emissions-dev |
Example names: Storage
Asset type | Scope | Format and examples |
---|---|---|
Storage account (general use) | Global | st<project, app or service><###>stnavigatordata001 stemissionsoutput001 |
Azure StorSimple | Global | ssimp<project, app or service><environment>ssimpnavigatorprod ssimpemissionsdev |
Azure Container Registry | Global | cr<project, app or service><environment><###>crnavigatorprod001 |
Example names: AI and machine learning
Asset type | Scope | Format and examples |
---|---|---|
Azure Cognitive Search | Global | srch-<project, app or service>-<environment>srch-navigator-prod srch-emissions-dev |
Azure Cognitive Services | Resource group | cog-<project, app or service>-<environment>cog-navigator-prod cog-emissions-dev |
Azure Machine Learning workspace | Resource group | mlw-<project, app or service>-<environment>mlw-navigator-prod mlw-emissions-dev |
Example names: Analytics and IoT
Asset type | Scope | Format and examples |
---|---|---|
Azure Data Factory | Global | adf-<project, app or service>-<environment>adf-navigator-prod adf-emissions-dev |
Azure Stream Analytics | Resource group | asa-<project, app or service>-<environment>asa-navigator-prod asa-emissions-dev |
Data Lake Storage account | Global | dls<project, app or service><environment>dlsnavigatorprod dlsemissionsdev |
IoT hub | Global | iot-<project, app or service>-<environment>iot-navigator-prod iot-emissions-dev |
Example names: Integration
Asset type | Scope | Format and Examples |
---|---|---|
Service Bus | Global | sb-<project, app or service>-<environment>.servicebus.windows.netsb-navigator-prod.servicebus.windows.net sb-emissions-dev.servicebus.windows.net |
Service Bus queue | Service Bus | sbq-<query descriptor>sbq-messagequery |
Service Bus topic | Service Bus | sbt-<query descriptor>sbt-messagequery |
Ref: Define your naming convention – Cloud Adoption Framework | Microsoft Learn