Niklas Blog

Exploring Device Management.

Using a naming convention for your Azure resources

31 December 2023

What is a naming convention about?

When setting up resources in Microsoft Azure, it is important to establish a naming convention. Naming conventions are sets of rules that dictate how resources should be named, making it easier to identify and organize them.

Why do you need a naming convention in Microsoft Azure?

Having a naming convention in place for your Azure resources can provide several benefits, such as:

  • Consistency: A naming convention ensures that all resources are named consistently across your environment, making it easier to understand the purpose of each resource.
  • Organization: By following a consistent naming convention, you can easily group and organize resources according to their function, location, or other relevant attributes.
  • Searchability: When resources are named in a consistent and meaningful way, it becomes easier to search for and identify specific resources within your environment.
  • Scalability: A well-designed naming convention can help you scale your resources in a structured and organized way, making it easier to manage your environment as it grows.

Best practice example for a naming convention based on Microsoft’s best practice

Microsoft Azure recommends that you use a structured naming convention that includes a combination of attributes that describe the resource. According to Microsoft’s guidelines, a naming convention should consist of the following elements:

  • Resource type: This identifies the type of Azure resource, such as a virtual machine, storage account, or database.
  • Workload/Application: This identifies the function of the resource, such as web server, database server, or load balancer.
  • Environment: This identifies in which environment your resource is assigned. For example dev or prod. If you like you can also use Azure Tags for this value instead of having it in your resources name.
  • Azure Region: This identifies the environment in which the resource is located, such as production, staging, or development.
  • Instance: You can use an Instance number to identify multiple resources and in which order they were created.

For example, if you were setting up a virtual machine in a development environment for a web server, you might name it „VM-Dev-Web01“. This name includes the resource type (VM), the environment (Dev), the function (Web), and a sequence number (01).

Conclusion

By using a consistent naming convention like this, you can easily identify and organize your resources, making it easier to manage your Azure environment as it grows. It also makes it much easier for other admins in your environment to understand the usage for your resources. In some cases you could also use Azure Tags to describe more details of your resources like for example a CostCenter or an Owner.

To learn more about an example and best practise for a Naming convention go to those Microsoft Learn pages:

Naming Convention Example: https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming

Resouce abbreviations: https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations