Azure naming conventions

In thisĀ Azure tutorial, we will discuss Azure naming conventions. Apart from this, we will also discuss on the below topics

  • Naming a Resource in Azure
  • Re-commanded prefix For Azure Resources
  • Naming rules and restrictions for Azure resources

Microsoft Azure naming conventions

It is always best practice to follow Azure naming conventions while naming any Azure objects or Azure components.

Naming a Resource in Azure

It is always better to follow the Microsoft Azure naming conventions while naming a resource in Azure

  • When naming the resource, the name should contain some meaningful information.
  • For example, if we are naming a public IP resource for a development workload, the name should be pip-SharePoint-prod-centralus-005.
  • As you will see, the information is very clear here. The name contains public IP(pip) with the environment details(prod) and Region details(central us), etc.
  • In Azure, the resource name must be unique within its scope.
  • There are some restrictions on the length of the resource names.

Re-commanded prefix For Azure Resources

There are some prefixes recommended as part of Microsoft Azure naming conventions before the name of the Azure resources

Virtual network

  • The name should start with the prefix vnet-
  • The format for the name of the virtual network is vnet-<Subscription type>-<Region>-<###>
  • For example vnet-prod-centralus-003
  • As you will see here, the information is very clear vnet is the virtual network, prod is for the production environment, centralus is the region you belong to.

Azure Subnet Naming Convention

  • The name should start with the prefix snet-
  • The format for the name of the Subnet is snet-<subscription>-<subregion>-<###>
  • For example snet-prod-centralus-003

Publicip

  • The name should start with the prefix pip-
  • The format for the name of the Publicip is pip-<vm name or app name>-<Environment>-<subregion>-<###>
  • For example pip-SharePoint-prod-centralus-005

Network security group

  • The name should start with the prefix nsg-
  • The format for the name of the Network security group is nsg-<policy name or app name>-<###>
  • For example nsg-sqlallow-001

Virtual network gateway

  • The name should start with the prefix vgw-
  • The format for the name of the virtual network gateway is vgw-<Subscription type>-<Region>-<###>
  • For example vgw-prod-centralus-001

Azure VM naming convention

  • The name should start with the prefix vm-
  • The format for the name of the Virtual machine is vm<policy name or app name><###>
  • For example vmsharepoint001

VM storage account

  • The name should start with the prefix stvm-
  • The format for the name of the VM storage account is stvm<performance type><app name or prod name><region><###>
  • For example stvmstplmcentralus2003

Web app

  • The name should start with the prefix app-
  • The format for the name of the Web app is app-<App Name>-<Environment>-<###>.[{azurewebsites.net}]
  • For example app-sharepoint-prod-001.azurewebsites.net

Notification Hubs

  • The name should start with the prefix ntf-
  • The format for the name of the Notification Hubs is ntf-<App Name>-<Environment>
  • For example ntf-sharepoint-dev

MySQL database

  • The name should start with the prefix mysql-
  • The format for the name of the MySQL database is mysql-<App Name>-<Environment>
  • For example mysql-sharepoint-dev

Azure Storage Account Naming Convention

  • The name should start with the prefix st-
  • The format for the name of the Storage account is st<storage name><###>
  • For example stsharepoint001

Azure Cognitive Services

  • The name should start with the prefix cog-
  • The format for the name of the Azure Cognitive Services is cog-<App Name>-<Environment>
  • For example cog-sharepoint-dev

Azure Machine Learning workspace

  • The name should start with the prefix mlw-
  • The format for the name of the Azure Machine Learning workspace is mlw-<App Name>-<Environment>
  • For example mlw-sharepoint-dev

Azure Data Factory

  • The name should start with the prefix adf-
  • The format for the name of the Azure Data Factory is adf-<App Name><Environment>
  • For example adf-sharepoint-dev

Event hub naming conventions

  • The name should start with the prefix evh-
  • The format for the name of the Event hub is evh-<App Name>-<Environment>
  • For example evh-sharepoint-prod

IoT hub

  • The name should start with the prefix iot-
  • The format for the name of the IoT hub is iot-<App Name>-<Environment>
  • For example iot-sharepoint-dev

Service Bus Naming Conventions

  • The name should start with the prefix iot-
  • The format for the name of the Service Bus is sb-<App Name>-<Environment>.[{servicebus.windows.net}]
  • For example sb-sharepoint-dev

Naming rules and restrictions for Azure resources

Below are some Naming rules and restrictions as part of Microsoft Azure naming conventions

Servers

  • The name should be within 3 to 63 characters.
  • Should start with a lowercase letter.
  • The name should contain lowercase letters and numbers.

Service

  • The name should be within 1 to 50 characters.
  • It should contain alphanumeric characters.
  • The name should start with a letter.

Service / APIs

  • The name should be within 1 to 256 characters
  • You can not use *#&+:<>? special characters.

service/certificates

  • The name should be within 1 to 256 characters
  • You can not use *#&+:<>? special characters.

service/groups

  • The name should be within 1 to 256 characters
  • You can not use *#&+:<>? special characters.

service/users

  • The name should be within 1 to 256 characters
  • You can not use *#&+:<>? special characters.

locks

  • The name should be within 1 to 90 characters
  • It can contain Alphanumerics, periods, underscores, hyphens, and parentheses but can’t end in a period.

profiles

  • The name should be within 1 to 260 characters
  • The name should start and end with an alphanumeric. It can contain alphanumeric and hyphens.

profiles/endpoints

  • The name should be within 1 to 50 characters
  • The name should start and end with an alphanumeric. It can contain alphanumeric and hyphens.

certificateOrders

  • The name should be within 3 to 30 characters
  • The name should contain alphanumeric.

accounts

  • The name should be within 2 to 64 characters
  • The name should start and end with an alphanumeric. It can contain alphanumeric and hyphens.

diskEncryptionSets

  • The name should be within 1 to 80 characters
  • The name should contain alphanumerics and underscores.

disks

  • The name should be within 1 to 80 characters
  • The name should contain alphanumeric and underscores.

images

  • The name should be within 1 to 80 characters
  • The name should Start with alphanumeric. End with alphanumeric or underscore.
  • It should contain alphanumerics, underscores, periods, and hyphens.

snapshots

  • The name should be within 1 to 80 characters
  • The name should Start with alphanumeric. End with alphanumeric or underscore.
  • It should contain alphanumeric, underscores, periods, and hyphens.

Virtual Machines

  • The name should be within 1 to 15 (Windows) and 1 to 64 (Linux)
  • The name can’t start with an underscore. Can’t end with a period or hyphen.
  • You Can’t use \/””[]:|<>+=;,?*@& special characters

virtualMachineScaleSets

  • The name should be within 1 to 15 (Windows) and 1 to 64 (Linux)
  • The name can’t start with an underscore. Can’t end with a period or hyphen.
  • You Can’t use \/””[]:|<>+=;,?*@& special characters

container groups

  • The name should be within 1 to 63 characters
  • The name can’t start or end with a hyphen. Consecutive hyphens aren’t allowed.
  • It should contain lowercase letters, numbers, and hyphens.

registries

  • The name should be within 5 to 50 characters
  • The name should contain alphanumeric.

managed clusters

  • The name should start and end with an alphanumeric.
  • It should contain alphanumerics, underscores, and hyphens.
  • The name should be within 1 to 63 characters

hubs

  • The name should be within 1 to 64 characters
  • The name should start with a letter and should contain alphanumeric.

hubs/connectors

  • The name should be within 1 to 128 characters
  • The name should start with a letter containing alphanumeric and underscores.

hubs/links

  • The name should be within 1 to 512 characters
  • The name should start with a letter containing alphanumeric and underscores.

hubs/views

  • The name should be within 1 to 512 characters
  • The name should start with a letter containing alphanumeric and underscores.

associations

  • The name should be within 1 to 180 characters
  • The name can’t end with a period or space.
  • You can’t use %&\?/ special characters.

jobs

  • The name should be within 3 to 24 characters
  • The name should contain alphanumeric, hyphens, underscores, and periods.

workspaces

  • The name should be within 3 to 30 characters
  • The name should contain alphanumeric, underscores, and hyphens

factories

  • The name should be within 3 to 63 characters
  • The name should start and end with an alphanumeric.
  • It should contain alphanumeric and hyphens.

accounts/storage accounts

  • The name should be within 3 to 60 characters
  • The name should contain alphanumerics, hyphens, and underscores

services

  • The name should be within 2 to 62 characters
  • The name should start with an alphanumeric.
  • It should contain alphanumerics, hyphens, periods, and underscores.

IotHubs

  • The name should be within 3 to 50 characters
  • The name can’t end with a hyphen.
  • It should contain alphanumeric and hyphens.

database accounts

  • The name should be within 3 to 44 characters
  • The name should start with a lowercase letter or number.
  • It should contain lowercase letters, numbers, and hyphens.

domains

  • The name should be within 3 to 50 characters
  • The name should contain alphanumeric and hyphens.

clusters

  • The name should be within 6 to 50 characters
  • The name should start with a letter. End with a letter or number.
  • It should contain alphanumeric and hyphens.

Webservices

  • The name should be within 1 to 260 characters
  • The name can’t end with a space.
  • You can not use <>*%&:?+/\ special characters.

public IP addresses

  • The name should be within 1 to 80 characters
  • The name should contain alphanumeric, underscores, periods, and hyphens.
  • It should Start with an alphanumeric and end with an alphanumeric or underscore.

virtual networks

  • The name should be within 2 to 64 characters
  • The name should contain alphanumerics, underscores, periods, and hyphens.
  • It should start with an alphanumeric and end with an alphanumeric or underscore.

Conclusion

In this Azure tutorial, We discussed the Azure naming standards

  • Naming a Resource in Azure
  • Re-commanded prefix For Azure Resources
  • Naming rules and restrictions for Azure resources
  • Microsoft Azure naming conventions