Microsoft Azure naming conventions

In this azure tutorial, we will discuss Microsoft 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
  • Azure blob naming convention

Microsoft Azure naming conventions

It is always best practice to follow the Microsoft Azure naming conventions while you are naming any of the 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 you are naming the resource, the name should contain some meaning full information.
  • For example, if we are naming a public IP resource for a development workload, then the name should be like pip-SharePoint-prod-centralus-005.
  • If 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 prefix recommended as part of Microsoft Azure naming conventions, before the name of the Azure resources

Virtual network

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

Subnet

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

Virtual machine

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

Storage account

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

Event hub

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

Service Bus

  • The name should start with 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 lower case 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 alphanumerics 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.

virtualMachines

  • 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 period or hyphen.
  • You Can’t use \/””[]:|<>+=;,?*@& specal charecters

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 period or hyphen.
  • You Can’t use \/””[]:|<>+=;,?*@& specal charecters

containerGroups

  • 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.

managedClusters

  • 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 and it should contain alphanumeric and underscores.

hubs / links

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

hubs / views

  • The name should be within 1 to 512 characters
  • The name should start with a letter and it should contain 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 alphanumerics and hyphens.

accounts / storageAccounts

  • 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 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 alphanumerics and hyphens.

databaseAccounts

  • 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 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.

publicIPAddresses

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

virtualNetworks

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

Azure blob naming convention

Below are few suggestion for the naming convention of an Azure blob container as part of the Microsoft Azure naming conventions.

  • The name of an Azure blob container should start with a letter or number.
  • The ideal length of an Azure blob container should be between 3 to 63 characters.
  • The name should contain only letters, numbers, and the hyphen.
  • You should use all lower case letters. Do not use upper case letter while naming the blob container.

You may like following Azure tutorials

Conclusion

In this Azure tutorial, We discussed

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

Leave a Comment