Azure Resource Naming Generator
Build Azure resource names with the Cloud Adoption Framework abbreviations, then check each name against the length and character rules for that resource type.
The same inputs for every resource type
| Resource | Name | Length and limit | Result |
|---|
How to use
- Choose the resource type. The abbreviation in brackets is Microsoft's recommended one.
- Enter the workload, for example
orders. Add an environment such asprod, a short region and an instance number. Empty optional parts are left out. - Read the generated name. A numeric instance is padded to three digits, so
1becomes001. - If the name breaks a rule, the box lists each broken rule in plain words. Shorten the region or workload, or change the characters.
- Scroll to the table to see the same inputs applied to every resource type. It shows quickly which resources need a shorter name.
Worked example
A team names a key vault for the orders workload in prod, in the region westeurope, instance 1. The tool builds kv-orders-prod-westeurope-001. That is 29 characters, and a key vault name allows 3 to 24, so the tool reports that it is 5 over. Changing the region to the short form weu gives kv-orders-prod-weu-001, 22 characters, which passes.
The storage account shows another rule. Choose the storage account type with the same inputs and the tool joins the parts without hyphens, because storage account names allow only lowercase letters and numbers: stordersprodweu001, 18 characters, from a limit of 3 to 24. The long region would give 25 characters, one too many. Type Orders with a capital O and the tool reports the uppercase letter instead of quietly changing it.
How it works
The generated name follows the pattern in the Cloud Adoption Framework: resource type abbreviation, workload, environment, region and instance, in that order, joined by hyphens. Microsoft's guidance is to standardise the order, choose whether to use a delimiter and use the recommended abbreviations to stay inside length limits. Not every resource allows hyphens. Where the rules forbid them, as for storage accounts and container registries, the tool joins the parts with no separator.
The data lives in one module. Each resource type carries its abbreviation from the Learn abbreviation page and its rules from the Learn naming rules page: minimum and maximum length, the allowed characters, what the name must start and end with, and its scope. The tool covers 39 common types, not the whole catalogue. Virtual machines appear twice, because a Windows host name is limited to 15 characters and a Linux name to 64.
Scope matters as much as length. A global name is unique across all of Azure, so a web app named app-orders-prod-001 becomes app-orders-prod-001.azurewebsites.net and only one customer can hold it. A resource group scope means the name must be unique only inside that group. Other scopes, such as a subnet inside a virtual network, are narrower still. Most names cannot be changed after creation, so put only stable facts in them and use tags for the rest.
Exam relevance: AZ-104 and AZ-305
The exams do not ask you to memorise abbreviations, but naming rules appear in practical scenarios. A deployment fails because a storage account name contains a hyphen or capital letter. A template needs a globally unique name. A governance question asks how to enforce a naming convention, where the answer is usually Azure Policy and tags rather than a document. AZ-305 asks you to design a governance structure, in which a consistent convention supports cost reporting and automation. The generator is a quick way to see why the rules differ by resource.
Common mistakes
- Using hyphens in a storage account name. Only lowercase letters and numbers are allowed, in 3 to 24 characters.
- Putting the full region name in every name. A key vault or storage account can run out of characters. Use a short code and use it everywhere.
- Assuming a global name is free. The name must be unique across Azure and the generator cannot check availability.
- Putting changeable details in the name. An owner or cost centre belongs in a tag, because most names cannot be changed later.
- Including sensitive information. Learn warns against personal, sensitive or confidential information in names and tags.
- Forgetting the Windows host name limit. It is 15 characters, even though the VM resource name can be longer.
Frequently asked questions
Which abbreviation does Microsoft recommend for a storage account?
The Learn abbreviation page lists st. A virtual machine is vm, a key vault is kv and a resource group is rg.
Why does my key vault name keep failing?
Key vault names must be 3 to 24 characters, use letters, numbers and hyphens, start with a letter, end with a letter or number and not contain consecutive hyphens.
Can I rename a resource after creating it?
For most resource types, no. Learn says most names cannot be changed after creation, so choose a convention before you deploy.
Do I have to follow the Microsoft pattern?
No. It is guidance, and Learn says every organisation needs a convention that suits it. Consistency matters more than the exact pattern.
Does this tool check that a name is available?
No. It cannot reach Azure. Availability for global names has to be checked when you create the resource.
Sources
- Abbreviation recommendations for Azure resources (Microsoft Learn)
- Define your naming convention (Microsoft Learn)
- Naming rules and restrictions for Azure resources (Microsoft Learn)
Related pages
- AZ-104: locks and tags for the details a name should not carry.
- AZ-104: Azure Policy for enforcing a convention.
- AZ-104: storage accounts for the account types behind the names.
- Storage redundancy chooser to pick the replication setting for a new storage account.
- All Azure tools