What information should I include when naming Azure resources?

Tags Azure
The choice of a name for any resource in Microsoft Azure is important because:

  • It is difficult to change a name later.
  • Names must meet the requirements of their specific resource type.

Consistent naming conventions make resources easier to locate. They can also indicate the role of a resource in a solution.

The key to success with naming conventions is establishing and following them across your applications and organizations.

NOTE: Custom policies can be applied to enforce naming conventions for various resources.  However, some Azure services require or attempt to automatically create resources with a specific name.  Applying such a policy to your subscription may interfere with deploying these resources.

UIC Azure Resource Group Naming Convention

The Technology Solutions has created a naming convention they will use for Azure, we recommend you use something similar to help organize your resources and resource groups.
When creating a resource group in Azure, use the following format:   Org-Unit-[NetID/Group]-Service Name-[Prod/Test/Dev]
Example: OVCI-Technology Solutions-ddd-web-RED-Prod 

Use affixes to avoid ambiguity

When naming resources in Azure, it is recommended to use common prefixes or suffixes to identify the type and context of the resource. While all the information about type, metadata, context, is available programmatically, applying common affixes simplifies visual identification. When incorporating affixes into your naming convention, it is important to clearly specify whether the affix is at the beginning of the name (prefix) or at the end (suffix).

For instance, here are two possible names for a service hosting a calculation engine:

  • SvcCalculationEngine (prefix)
  • CalculationEngineSvc (suffix)

Affixes can refer to different aspects that describe the particular resources. The following table shows some examples typically used.

Aspect Example Notes
Environment dev, prod, QA Identifies the environment for the resource
Location uw (US West), ue (US East) Identifies the region into which the resource is deployed
Instance 1, 2, ... For resources that have more than one named instance such as VMs or NICs.
Product or Service service Identifies the product, application, or service that the resource supports
Role sql, web, messaging Identifies the role of the associated resource

When developing a specific naming convention for your Dept/Unit/projects, it is important to choose a common set of affixes and their position (suffix or prefix).

Naming rules and restrictions

Each resource or service type in Azure enforces a set of naming restrictions and scope. Any naming convention or pattern must adhere to the required naming rules and scope. For example, while the name of a virtual machine maps to a DNS name (and is thus required to be unique across all of Azure), the name of a virtual network is scoped to the resource group in which it resides.

In general, avoid having any special characters (- or _) as the first or last character in any name. These characters will cause most validation rules to fail.

General

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Resource Group Subscription 1-90 Insensitive Alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the regex documented here. <service short name>-<environment>-rg profx-prod-rg
Availability Set Resource Group 1-80 Insensitive Alphanumeric, underscore, and hyphen <service-short-name>-<context>-as profx-sql-as
Tag Associated Entity 512 (name), 256 (value) Insensitive Alphanumeric including Unicode characters; special characters except <, >, %, &, \, ?, /. See limitations here. "key" : "value" "department" : "Central IT"
API Management Global 1-50 Insensitive 0-9, a-z, A-Z and - <apim-service-name> contoso
Key Vault Global 3-24 Insensitive 0-9, a-z, A-Z and - <service short name>-<environment>-kv myapp-prod-kv

Compute

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Virtual Machine Resource Group 1-15 (Windows), 1-64 (Linux) Insensitive 0-9, a-z, A-Z and - <name>-<role>-vm<number> profx-sql-vm1
Function App Global 1-60 Insensitive 0-9, a-z, A-Z and - <name>-func calcprofit-func

Note: Virtual machines in Azure have two distinct names: virtual machine name, and host name. When you create a VM in the portal, the same name is used for both the host name, and the virtual machine resource name. The restrictions above are for the host name. The actual resource name can have up to 64 characters.

Web

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Web App Global 1-60 Insensitive 0-9, a-z, A-Z and - <app_name>-<source-slot-name> contoso-staging
Web App Name Resource Group 3-24 Insensitive 0-9, a-z, A-Z and - <appname> mywebapp
Slot Name Web App 2-59 Insensitive 0-9, a-z, A-Z and - <slotname> production
Web App Setting Name Web App N/A Insensitive All characters N/A N/A
Web App Setting Value Setting N/A Insensitive All characters N/A N/A
Web App Connection String Web App N/A Insensitive All characters N/A N/A
Web Job Name Web App 1-29 Insensitive 0-9, a-z, A-Z and - <jobname> myJob

Warning: Web App Settings Name for Linux Apps has a valid character pattern of: 0-9, a-z, A-Z, _

Storage

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Storage account name (data) Global 3-24 Lowercase Alphanumeric <globally unique name><number> profxdata001
Storage account name (disks) Global 3-24 Lowercase Alphanumeric <vm name without hyphens>st<number> profxsql001st0
Container name Storage account 3-63 Lowercase 0-9, a-z and - <context> logs
Blob name Container 1-1024 Sensitive Any URL characters <variable based on blob usage> <variable based on blob usage>
Queue name Storage account 3-63 Lowercase 0-9, a-z and - <service short name>-<context>-<num> awesomeservice-messages-001
Table name Storage account 3-63 Insensitive Alphanumeric <service short name><context> awesomeservicelogs
File share name Storage account 3-63 Lowercase 0-9, a-z and - <variable based on file share usage> <variable based on file share usage>
Data Lake Store Global 3-24 Lowercase Alphanumeric <name>dls telemetrydls
Managed Disk name Resource Group 1-80 Insensitive Alphanumeric, hyphen and underscore but not on character 1 <disktype>disk<number> OSdisk1

Networking

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Virtual Network (VNet) Resource Group 2-64 Insensitive Alphanumeric, hyphen, underscore, and period <service short name>-vnet profx-vnet
Subnet Parent VNet 2-80 Insensitive Alphanumeric, hyphen, underscore, and period <descriptive context> web
Network Interface Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <vmname>-nic<num> profx-sql1-vm1-nic1
Network Security Group Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <service short name>-<context>-nsg profx-app-nsg
Network Security Group Rule Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <descriptive context> sql-allow
Public IP Address Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <vm or service name>-pip profx-sql1-vm1-pip
Load Balancer Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <service or role>-lb profx-lb
Load Balanced Rules Config Load Balancer 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <descriptive context> http
Azure Application Gateway Resource Group 1-80 Insensitive Alphanumeric, hyphen, underscore, and period <service or role>-agw profx-agw
Traffic Manager Profile Resource Group 1-63 Insensitive Alphanumeric, hyphen, and period <descriptive context> app1

Containers

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Container Registry Global 5-50 Insensitive Alphanumeric <service short name>registry app1registry

Messaging

Entity Scope Length Casing Valid Characters Suggested Pattern Example
Service Bus namespace Global 6-50 Insensitive Alphanumeric, hyphen; must start with a letter; see here for details. <service short name>-bus app1-bus
Event Hubs namespace Global 6-50 Insensitive Alphanumeric, hyphen; must start with a letter; must end with a letter or number <service>-ehns app1-ehns
Event hub Event Hubs namespace 1-50 Insensitive Alphanumeric, period, hyphen, underscore. Must start and end with a letter or number. <service>-<role>-eh app1-orders-eh


Print Article

Details

Article ID: 922
Created
Fri 1/15/21 6:15 PM
Modified
Thu 5/27/21 2:36 PM

Related Services / Offerings (1)

Microsoft Azure is an ever-expanding set of cloud services to help UIC innovate and meet your organizational needs. It’s the freedom to build, manage, and deploy applications on a massive, global network using your favorite tools and frameworks.