Daily Apps Kit · Tools

Azure resource naming rules

Length limits, uniqueness scopes and naming profiles for 29 Azure resources, with examples and links to the generator.

Open the Azure, AWS and GCP name generator

A naming convention helps a team recognise resources. Azure naming restrictions decide whether a resource name is accepted. A recommended prefix alone does not establish validity.

Supported Azure naming profiles

These 29 profiles cover common application infrastructure. App Service and VM profiles use a conservative ASCII subset. Checks do not establish name availability, reserved-word acceptance, subscription permissions or policy compliance.

ResourceLengthScopeLocal profile
Resource group1–90subscriptionLetters, digits, underscores, hyphens, periods and parentheses; no trailing period.
^[\p{L}\p{Nd}_.()\-]+$
Storage account3–24global3–24 lowercase letters or digits; no separators.
^[a-z0-9]+$
Virtual machine / hostname (Windows, conservative ASCII)1–15resource group1–15 ASCII letters, digits or hyphens; no trailing hyphen or all-numeric hostname. Conservative hostname profile.
^[A-Za-z0-9-]+$
Virtual machine / hostname (Linux, conservative ASCII)1–64resource group1–64 ASCII letters, digits or hyphens; no trailing hyphen. Conservative hostname profile.
^[A-Za-z0-9-]+$
Virtual network2–64resource group2–64 ASCII letters, digits, underscores, periods or hyphens; start alphanumeric, end alphanumeric or underscore.
^[A-Za-z0-9][A-Za-z0-9_.-]*[A-Za-z0-9_]$
Key Vault3–24global3–24 characters; resource-specific character and start/end restrictions. Uniqueness scope: global.
^[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9]$
no-double
Web app (ASCII profile)2–60global or App Service Environment domain2–60 characters; conservative ASCII profile; provider also supports mapped Unicode. Uniqueness scope: global or App Service Environment domain.
^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$
Function app (ASCII profile)2–60global or App Service Environment domain2–60 characters; conservative ASCII profile; provider also supports mapped Unicode. Uniqueness scope: global or App Service Environment domain.
^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$
App Service plan (ASCII profile)1–60resource group1–60 characters; conservative ASCII profile; provider also supports mapped Unicode. Uniqueness scope: resource group.
^[A-Za-z0-9-]+$
AKS cluster1–63resource group1–63 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9])?$
Container registry5–50global5–50 characters; letters and digits only. Uniqueness scope: global.
^[A-Za-z0-9]+$
Container app2–32resource group2–32 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[a-z][a-z0-9-]*[a-z0-9]$
SQL server1–63global1–63 characters; resource-specific character and start/end restrictions. Uniqueness scope: global.
^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
SQL database1–128server1–128 characters; resource-specific character and start/end restrictions. Uniqueness scope: server.
^[^<>*%&:\\/?\x00-\x1f\x7f]+$
no-dot-space
Cosmos DB for NoSQL account3–44global3–44 characters; resource-specific character and start/end restrictions. Uniqueness scope: global.
^[a-z0-9][a-z0-9-]*$
Service Bus namespace6–50global6–50 characters; resource-specific character and start/end restrictions. Uniqueness scope: global.
^[A-Za-z][A-Za-z0-9-]*[A-Za-z0-9]$
Log Analytics workspace4–63resource group4–63 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$
Application Insights1–260resource group1–260 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[^%&\\/?\x00-\x1f\x7f]+$
no-dot-space
Private endpoint2–64resource group2–64 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Network security group1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Network interface1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Public IP address1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Application gateway1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
External load balancer1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Route table1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Azure Firewall1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Bastion host1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$
Managed data disk1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9_-]+$
Availability set1–80resource group1–80 characters; resource-specific character and start/end restrictions. Uniqueness scope: resource group.
^[A-Za-z0-9](?:[A-Za-z0-9_.-]*[A-Za-z0-9_])?$

Validate before provisioning

For example, stpaymentsprodeus001 uses concatenated components for a storage account, while rg-payments-prod-eus-001 retains separators. A long workload can push a storage account or Key Vault name over its length limit. The generator reports this rather than silently cutting the name.

Function apps longer than 32 characters deserve a separate host-ID collision review when sharing storage. The resource name can pass its own length check while that operational risk remains.

Sources and review date

Reviewed October 10, 2026 against Microsoft naming restrictions and Microsoft resource abbreviations. Provider documentation takes precedence when rules change.