~/azurenamingconvention ☀ LIGHT conditional access copilot prompts kql ☕ Support me apps ← about me

Azure Naming Convention — design it once, name every resource_

Build your own pattern on the Microsoft Cloud Adoption Framework abbreviations, get names that fit the real limit of 230 Azure resource types, check the names you already have, and export an Azure Policy that enforces your convention.

230resource types with their real rules
59regions with short codes
9code formats, from Terraform to CSV
1Azure Policy to enforce it
Environment
Instance
001

Guide — an Azure naming convention in five steps

Design it once, apply it everywhere, then let Azure Policy keep it that way.

1Define your convention

In the panel on the left, start from a preset or build your own: tick the segments you use, move them with ▲▼, pick the separator and the instance digits, and edit the environment and region codes. Every tab follows.

2Name one resource

In generator, search a resource type, type the workload and pick the environment and region. The name is split into coloured parts, with a length meter and a check against Microsoft’s real rules for that type.

3Name a whole project

Project suite names every type you tick at once, for several environments and regions side by side. Start from a set such as Landing zone core or Web app + SQL, then export it.

4Check what you already have

Paste names into validator, or a Resource Graph export with the Azure type. Each one is tested against Microsoft’s rules and your pattern, with a suggested fix when one is possible.

5Enforce it

In policy, choose the types to check and download an Azure Policy as Bicep, ARM, Terraform, CLI or PowerShell. Try names in the tester first, then start with Audit.

Cheat sheet

PATTERNThe CAF pattern
format
{type}-{workload}-{env}-{region}-{instance}
example
rg-payments-prod-weu-001
storage
stpaymentsprodweu001, no separators allowed
with org
ctso-rg-payments-prod-weu-001, with a short organisation code in front
LIMITSThe tightest types
storage account
3–24, lowercase letters and digits only
key vault
3–24, starts with a letter, no double hyphen
container registry
5–50, letters and digits only
Windows VM
15-character computer name
AKS node pool
12 on Linux, lowercase letters and digits
resource group
1–90, the most generous
ABBREVIATIONSMost used
rg · vnet · snet
resource group, virtual network, subnet
nsg · kv · st
network security group, key vault, storage account
app · func · asp
web app, function app, App Service plan
aks · cr · sql
AKS cluster, container registry, SQL server
log · appi
Log Analytics workspace, Application Insights
LINKSOpen it ready-made
a name
?resource=st&workload=shop&env=prod&region=weu
a check
?tab=validate&validate=kv-shop-prod-weu-001
everything
“Copy link to this convention” in the panel keeps your whole pattern in the address

Azure naming conventions, explained

A naming convention is the agreement on how every Azure resource in your organisation is called. A good one lets you read a resource name in a bill, a log line or an alert and know what it is, which workload it serves, which environment it lives in and where it runs. This page builds the convention with you, checks every name against Microsoft’s real limits and then turns the convention into an Azure Policy. Most Azure resources cannot be renamed after they are created, only recreated, so it pays to settle the pattern before the first deployment.

What does the Microsoft Cloud Adoption Framework pattern look like?

The Cloud Adoption Framework (CAF) recommends a short abbreviation for the type, followed by the workload, the environment, the region and an instance number: {type}-{workload}-{env}-{region}-{instance}, for example rg-payments-prod-weu-001. That is the starting point here. You can add an organisation code and a project or business-unit code, switch segments off, change their order, choose another separator (or none) and set the number of instance digits. Presets cover the common variations.

Where do the abbreviations come from?

The abbreviations are the ones on Microsoft’s “Abbreviation recommendations for Azure resources” page, matched with their Azure resource types: 217 entries on that list plus a few extras that are not on it, such as subscriptions, budgets, Redis caches and Azure NetApp Files, marked as not on the CAF list in the reference. If your team already uses a different abbreviation, change it in the reference tab: your version is then used in the generator, the project suite, the validator and the policy.

Why do storage accounts and key vaults look different from other names?

Every Azure resource type has its own rules for length, allowed characters and where a name may start or end. A storage account takes 3 to 24 lowercase letters and digits and no hyphens at all; a key vault takes 3 to 24 characters, must start with a letter and cannot contain two hyphens in a row; a Windows virtual machine has a 15-character computer name; a resource group may be 90 characters. The rules in this tool come from Microsoft’s “Naming rules and restrictions for Azure resources”. When your separator is not allowed for a type, the name uses the nearest allowed one and says so, so a storage account becomes stpaymentsprodweu001 while the resource group next to it keeps its hyphens. Types for which Microsoft publishes no rule are marked no published rule and get a generic check.

What happens when the name does not fit?

The workload is the flexible part, so it is shortened first, either cut at the limit or with its vowels dropped first (your choice in the panel). Fixed parts are never cut silently. When even a two-letter workload does not fit, the generator says so and shows alternatives that do, for example without separators or without the region. A 15-character Windows computer name is the usual case: vm-payments-prod-weu-001 is 24 characters, so the tool suggests variants such as vmpayprodweu001.

What is the unique suffix for?

Some names must be unique across all of Azure: storage accounts, key vaults, web apps, SQL servers, container registries and a few more, because they become part of a public address. With the unique suffix option on, these names get a short hash of your own inputs added at the end. It is not random: the same inputs always give the same suffix, so the name is reproducible in a pipeline. Keep the inputs stable after the first deployment, and still check availability before you deploy, because nothing in a browser can know which names are taken.

How do I check the names I already have?

Paste them into the validator, one per line. Add the type after a comma, either the Azure type such as Microsoft.KeyVault/vaults or an abbreviation such as kv, and the check is exact; without it the type is read from the prefix of the name. To get all names out of Azure, run resources | project name, type in Azure Resource Graph Explorer, export the CSV and paste it. For every name you see whether it breaks one of Microsoft’s rules, whether it is valid but off your pattern, and a suggested corrected name when the tool can work one out.

How does the Azure Policy work?

The policy tab turns your convention into one Azure Policy definition. For every resource type you pick it contains a clause that fires when the name has the wrong number of parts, the wrong type abbreviation, an environment or region code you did not allow, or the wrong number of instance digits. Azure Policy has no regular expressions, so the rule is built from the functions it does have: split cuts the name at the separator, length counts the parts, and each part is tested with in, equals or match. The environment and region codes are policy parameters, so you can edit them in Azure without touching the rule. Pick Audit first and read the compliance report; switch to Deny only when the estate is clean, because Deny stops every new deployment whose name does not match. By default the policy skips names that Azure creates itself, such as NetworkWatcherRG and the MC_ resource groups of AKS.

What can the policy not do?

It sees only the name text. Azure Policy compares text without regard to case, so it cannot require lowercase; it cannot tell whether the workload part is a sensible word; it cannot know whether a globally unique name is free; and child resources, such as subnets or SQL databases, are not checked because their names depend on the parent. A single rule may hold at most 4,096 condition expressions, and the policy tab shows how many yours uses. Types without separators, such as storage accounts, are checked only on their abbreviation and the instance digits. The built-in tester runs your rule against a name in the browser, so you can see which clause fires before you deploy.

Finished names or names built from variables?

For Terraform, Bicep, PowerShell and the Azure CLI the project suite can write the finished names, or the same names assembled from a few variables (workload, environment, region code, instance and, where used, organisation, project and suffix). The second style means a new environment is one changed variable. The other formats (ARM parameters, JSON, YAML, Markdown and CSV) hold finished names, for several environments and regions side by side.

Which regions are included?

All 59 regions Microsoft lists, each with a short code: weu for West Europe, neu for North Europe, eus2 for East US 2, sec for Sweden Central and so on. You can change any code, or switch to the full programmatic name such as westeurope. The panel warns when two regions end up with the same code.

How accurate are the rules?

The length, character and start/end rules were taken from Microsoft’s documentation in October 2026, and the abbreviations from the CAF list of the same month. Azure adds services and changes limits from time to time, so treat the tool as a careful reference and not as a guarantee, and check Microsoft’s pages (linked in the generator) for anything you build on. A deployment that fails with a naming error is the final word.

Privacy and what is stored

There is no account, and nothing you type is sent anywhere. The page loads its font from Google Fonts and page statistics from SimpleAnalytics, and it makes no other network requests: the catalogue, the rules, the policy builder and the tester all run in your browser. Your convention, your selections and the names you paste in the validator are kept in this browser under azn-v2 so they are there next time, and your light or dark choice under jb-theme. “Copy link to this convention” puts the convention after a # sign in the address, which a server never receives. “Open a CSV or text file” reads the file on your device and does not upload it.

More free tools