~/azurenamingconvention ☀ LIGHT apps ← about me

🌐 Language

// microsoft cloud adoption framework · caf compliant
█████╗ ███████╗ ██╗ ██╗ ██████╗ ███████╗ ██╔══██╗ ╚══███╔╝ ██║ ██║ ██╔══██╗ ██╔════╝ ███████║ ███╔╝ ██║ ██║ ██████╔╝ █████╗ ██╔══██║ ███╔╝ ██║ ██║ ██╔══██╗ ██╔══╝ ██║ ██║ ███████╗ ╚██████╔╝ ██║ ██║ ███████╗ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝

Azure naming convention generator_

Generate CAF-compliant Azure resource names for 200+ resource types across 47 regions — live validation against the real Azure limits, batch auditing, breakdown view.
Export as Terraform · Bicep · ARM · PowerShell · Azure CLI · YAML · Markdown · CSV · Azure Policy. Free, no signup, 100% client-side.

alphanumeric only · lowercase · no spaces
001
▲▼ reorder · uncheck to omit segment
select a resource type
and fill in the form
to generate a name
// caf naming pattern

Microsoft's recommended pattern:
{type}-{workload}-{env}-{region}-{instance}

Example: rg-shop-prod-weu-001
Storage (no separators): stshopprodweu001

// globally unique names

Anything with a public endpoint must be unique across all of Azure: storage accounts, key vaults, web and function apps, container registries, SQL servers, Cosmos DB, Service Bus, Event Hubs, API Management, Front Door and more. The generator flags them and can add a deterministic suffix.

// the tightest limits

Storage account: 3–24, lowercase letters and digits only
Container registry: 5–50, letters and digits only
Key vault: 3–24, must start with a letter
Windows VM: 15-character computer name
Container app: 2–32, lowercase
Most other resources: 1–80

// environments

sbx sandbox · dev development · tst test
uat user acceptance · acc acceptance
stg staging · prod production
dr disaster recovery · shrd shared platform

// enforce it

Export an Azure Policy definition built from your own pattern and assign it at a management group — audit first, deny once the estate is clean. Validate a whole subscription at once with the batch checker.

// renaming is (mostly) impossible

Most Azure resources cannot be renamed — you recreate and migrate. That is why the convention is worth settling before the first deployment, and why the validator checks the real per-resource rules rather than a generic pattern.

Azure naming conventions — the complete answer

Sixty-eight questions on the Cloud Adoption Framework pattern, where every abbreviation comes from, the real per-resource length and character limits, how to add org and project segments without breaking storage accounts, and how to turn a convention into an Azure Policy that actually enforces it.

01. Using the generator

What does this tool do?

It builds Azure resource names that follow the Microsoft Cloud Adoption Framework, checks them against the real per-resource naming rules, and exports the result for Terraform, Bicep, ARM, PowerShell, the Azure CLI, Azure Policy and more. It covers 200+ resource types and 47 regions, and runs entirely in your browser.

How do I generate a single name?

Pick a resource type, type your workload name, choose an environment and a region, and the name appears with a live breakdown of every segment, a length meter against that resource's real limit, and any rule violations. Nothing is submitted — the name updates as you type.

What is the Project suite tab for?

It generates names for every resource type at once from a single workload, environment and region — the fastest way to plan a new landing zone or application. Filter by category, then export the whole set in one click.

Can I add my own segments, like a company or project code?

Yes. Alongside the standard type, workload, environment, region and instance segments there are org / company and project / business unit segments. Fill either one in and it joins the pattern automatically; leave them empty and they disappear. Every segment can be reordered with ▲▼ or switched off.

Can I change the separator?

Yes — hyphen, underscore, period or none at all. The choice is applied everywhere except resources that forbid the character: storage accounts and container registries always come out without separators because Azure does not allow them.

What does the “unique suffix” option do?

For globally unique resources — storage accounts, key vaults, app services, SQL servers, container registries — it appends a short deterministic suffix derived from your own inputs. The same inputs always produce the same suffix, so it is stable across runs and safe to commit, while making a collision with someone else's name far less likely.

What happens when a name is too long?

The workload segment is shortened first, because it is the only part carrying no fixed meaning — that keeps the prefix, environment, region and instance intact. If the result still exceeds the limit it is truncated and the validator says so explicitly rather than quietly producing an invalid name.

Can I link to a generated name?

Yes. The address bar stays in sync as you work, so you can copy the URL or build one by hand: ?resource=rg&workload=shop&env=prod&region=weu&instance=1. org, project and sep are supported too, ?tab=gen|project|validate|ref opens a specific tab, and ?tab=validate&validate=rg-shop-prod-weu-001 validates a name directly.

Does the tool send my names anywhere?

No. There is no back end. The resource catalogue, the rules and every export are part of the page, so it works offline once loaded and nothing you type leaves the browser — which matters more than it sounds, since resource names often reveal customer names and project codes.

Is it free?

Free, with no account and no limits. It is one of a set of client-side tools at jasperbernaers.com/apps.

02. The CAF naming convention

What is the Microsoft Cloud Adoption Framework naming convention?

The CAF recommends composing a name from meaningful components in a consistent order: {resource type}-{workload}-{environment}-{region}-{instance}. A production resource group for a shop in West Europe becomes rg-shop-prod-weu-001. The point is that a name alone tells you what a resource is, who owns it, where it lives and which environment it belongs to.

Is the CAF convention mandatory?

No — Azure enforces only the technical rules per resource type. CAF is a recommendation, and Microsoft explicitly expects organisations to adapt it. What matters far more than following it exactly is picking one convention and applying it everywhere, because the value comes from consistency.

What order should the segments be in?

CAF puts the resource-type abbreviation first, which sorts and filters beautifully in the portal, in az resource list output and in a cost export — all your resource groups cluster together. Some organisations put the company or business unit first instead. Both work; mixing them within one tenant does not.

Should I include the region in every name?

Include it if you deploy the same workload to more than one region, or expect to. It is one of the hardest things to add later, because renaming most Azure resources means recreating them. If you are certain a workload is single-region forever, the characters are better spent on the workload name.

Why include an instance number?

Because “there will only ever be one” is rarely true. A three-digit instance costs four characters and saves you from vm-app-prod-weu and vm-app-prod-weu-new living side by side. It also gives Terraform count and Bicep loops something predictable to generate.

Should the environment be in the name or only in tags?

Both, ideally. Tags are queryable and can be changed; names are visible in every list, log line, alert and bill without a join. The common failure is relying on tags alone and then reading an incident alert that names a resource you cannot place.

What environment abbreviations should I use?

There is no official list. The generator offers sbx, dev, tst, uat, acc, stg, prod, dr and shrd. Pick a set, write it down, and never let prd and prod coexist — that single inconsistency defeats every filter you will ever write.

Should names be lowercase?

Yes, as a rule. Most Azure resource names are case-insensitive, but a few resource types are case-sensitive, several forbid uppercase outright, and DNS-based names are lowercased anyway. Sticking to lowercase everywhere removes a class of bug for no cost.

How long should a workload name be?

Short enough that a storage account still works. Storage accounts allow 24 characters total, so with st, an environment, a region and an instance you have roughly 10–12 characters for the workload. Choosing a workload abbreviation that survives the tightest resource is easier than making an exception for it later.

Do subscriptions and management groups follow the same convention?

They follow the same spirit with different segments — typically {org}-{business unit or landing zone}-{environment}, since a region and an instance rarely apply. CAF's landing-zone guidance treats them as part of the same naming decision, which is why both are in the reference table here.

03. Abbreviations and resource types

Where do the abbreviations come from?

From Microsoft's own list, Abbreviation examples for Azure resources, in the Cloud Adoption Framework's Ready guidance. The catalogue here mirrors that page — rg, vnet, snet, nsg, kv, st, aks, cr, app, func, sbns, evhns, log, appi and the rest — including the newer AI Foundry, Container Apps, Fabric and Managed Grafana entries.

How many resource types are covered?

Over 200, grouped into management, monitoring, compute, app services, containers, databases, storage, networking, security, messaging, analytics and IoT, AI and machine learning, DevOps and virtual desktop. The Reference tab lists every one with its abbreviation, length limits, scope and allowed characters, and it is searchable.

Why do some resources share an abbreviation?

Because Microsoft's list does. A Front Door profile and a classic Front Door are both afd; several Cosmos DB APIs share the cos stem with a suffix. Where the shared abbreviation would be genuinely ambiguous, the catalogue keeps Microsoft's more specific variant, such as cosno for NoSQL and cosmon for MongoDB.

What abbreviation should I use for something that is not listed?

Build one the same way Microsoft does: take the shortest unambiguous contraction of the service name, in lowercase, two to six characters, and check it does not collide with an existing abbreviation. Then write it into your own naming standard — an abbreviation that lives only in one engineer's head is not a convention.

Why is there no abbreviation for policy definitions or DNS zones?

Because Microsoft recommends against one. A policy definition should be named for what it does, and a DNS zone must be the actual domain name. The reference table keeps both entries so the guidance is visible rather than silently missing.

Which resources need globally unique names?

Anything with a public endpoint: storage accounts, key vaults, web and function apps, container registries, SQL logical servers, Cosmos DB accounts, Service Bus and Event Hubs namespaces, API Management, Redis, Front Door, Traffic Manager, Data Factory, AI Search, Static Web Apps, SignalR, Web PubSub and more. The generator flags them, the reference table marks them, and the unique-suffix option exists for exactly this.

Why do storage accounts and container registries have no hyphens?

Their names become part of a public DNS host name — mystorage.blob.core.windows.net. Storage accounts allow only lowercase letters and digits, 3–24 characters; container registries allow only letters and digits, 5–50. The generator drops separators for these automatically instead of producing a name Azure will reject.

What is the difference between the resource name and the VM computer name?

An Azure virtual machine has both. The resource name can be up to 64 characters; the operating system computer name is limited to 15 characters on Windows and 64 on Linux. The catalogue lists Windows and Linux VMs separately for that reason — it is the single most common naming surprise in Azure.

Do child resources need the parent name in them?

Usually not. A subnet already lives inside a named virtual network, so snet-app-prod-weu-001 is enough — repeating the VNet name wastes characters and gets out of date. Name child resources for their role: snet-web, snet-data, snet-agw.

04. Azure naming rules and limits

Where do the length limits and character rules come from?

From Microsoft's Naming rules and restrictions for Azure resources reference. Each resource type in this tool carries its own minimum and maximum length, allowed character set, and any start or end constraint, and the validator reports which specific rule a name breaks rather than a generic “invalid”.

What are the most restrictive Azure resources to name?
  • Storage account — 3–24, lowercase letters and digits only
  • Container registry — 5–50, letters and digits only
  • Key vault — 3–24, must start with a letter, no consecutive hyphens
  • Windows VM — 15 characters for the computer name
  • Container app — 2–32, lowercase, must start with a letter
  • AKS node pool — 12 characters on Linux, 6 on Windows

If a convention survives these six, it survives everything.

Which characters are generally allowed?

Most resources accept letters, digits, hyphens, underscores and periods, must start with a letter or digit, and must end with a letter, digit or underscore. Resource groups additionally allow parentheses and simply cannot end with a period. The exceptions are the DNS-backed resources listed above.

Are Azure resource names case sensitive?

Mostly not — resource and resource group names are compared case-insensitively, so you cannot have rg-App and rg-app in the same subscription. A small number of resource types are case-sensitive, and mixed case in a name that becomes a URL is asking for trouble. Lowercase avoids the whole question.

Can two resources have the same name?

Yes, if their scopes differ — the same name can exist in two resource groups, and for resource-group-scoped types that is legal. It is also a good way to confuse everyone reading a cost report, which is why the environment and region belong in the name.

Can I rename an Azure resource?

Almost never. A handful of resource types support rename, but for the vast majority the only way is to create a new resource with the right name and move the data or workload across. That is the single strongest argument for getting the convention right before the first deployment — and for validating names in CI rather than in the portal.

What about reserved words?

Resources with public endpoints cannot use reserved words or trademarks in their names, and Microsoft does not publish an exhaustive list. In practice this bites with names containing microsoft, azure, windows and similar. If a globally unique name is rejected despite passing every visible rule, a reserved word is the likely cause.

Why does the tool warn about “#” in a name?

Because a hash symbol breaks URL parsing for anything with an endpoint, and Microsoft recommends avoiding it. It is legal in some resource names and still a bad idea in all of them.

Does the validator guarantee my name will be accepted?

It checks every documented rule for that resource type, which catches the overwhelming majority of rejections. It cannot check the two things that depend on the world outside your browser: whether a globally unique name is already taken, and whether it contains a reserved word. Both only surface at deployment time.

What does the batch validator do?

Paste a whole list of names — for example the output of az resource list --query "[].name" -o tsv — and every one is matched to a resource type by its prefix and checked against that type's rules. You get a valid / invalid / unrecognised summary and the specific problem per name, which is the fastest way to audit an existing subscription against your convention.

05. Regions, environments and segments

Which region codes does the tool use?

Short codes for 47 public Azure regions across Europe, the Americas, Asia Pacific and the Middle East and Africa — weu, neu, uks, frc, gwc, sec, eus, eus2, scus, wus2, cac, brs, sea, jpe, aue, inc, uaen, san and the rest, each shown next to its full Azure region name.

Is there an official list of Azure region abbreviations?

No. Microsoft publishes the region names used by the API — westeurope, eastus2 — but no official short forms, which is why every organisation invents slightly different ones. The codes here follow the most common industry usage; the full API name is shown alongside so you can map to whatever your team already uses.

Should I use westeurope or weu in a name?

The short code, in almost every case. westeurope costs eleven characters, and on a storage account that is nearly half your budget. Keep the full region name in a tag or in your infrastructure code, where length is free.

Do old deep links with the previous region codes still work?

Yes. The earlier codes such as westeu and northeu are mapped to their current equivalents, so links shared before still resolve to the right region.

What is the org segment for?

A company or tenant prefix, used by organisations that host several businesses in one tenant or want every resource to carry the group name — contoso-rg-shop-prod-weu-001. It is off by default because most single-tenant estates do not need it and it costs characters everywhere.

What is the project / business unit segment for?

The layer between an organisation and a workload: a department, a cost centre, a landing zone or an application portfolio. It is the segment most often missing from a convention that later has to answer “which team pays for this?”.

Can I drop the workload segment?

You can switch off any segment, including the workload — some platform teams name shared services purely by type, environment and region. Bear in mind the resource type abbreviation is not unique on its own: two production VNets in West Europe would both want the same name.

How do I mirror a convention my organisation already has?

Reorder the segments with ▲▼, switch off the ones you do not use, set the separator, and fill in org and project if you have them. Then use the share link as the canonical definition of your convention — anyone who opens it gets exactly your pattern, and the Azure Policy export turns it into something enforceable.

06. Exports, automation and policy

Which export formats are available?

Terraform locals, Bicep variables, ARM parameters JSON, plain JSON, YAML, PowerShell variables, Azure CLI shell variables, a Markdown table, CSV, and an Azure Policy definition. The reference table itself can also be downloaded as CSV.

How do I use the Terraform export?

Fill in the Project suite tab, click Terraform, and paste the locals block into your configuration. Reference names as local.naming.rg_name rather than repeating string literals — that way a convention change is one edit rather than a search-and-replace across the repository.

Should I generate names in Terraform instead of pasting them?

For a mature setup, yes — compute the name from variables in a locals block, or use a naming module, so it cannot drift. This tool is for designing and validating the convention, checking edge cases against the real limits, and generating the first version of that block.

What does the Azure Policy export produce?

A custom policy definition that uses matchesRegex against the resource name for the most common resource types, built from your current pattern — segments, order, separator and environment and region code lists included. Assign it at a management group and non-conforming resources are audited or denied at creation.

Should I set the policy effect to Deny straight away?

No. It ships with Audit as the default for a reason: run it across your existing estate first, look at the compliance report, fix or exempt what it finds, and only then switch to Deny. A naming policy set to Deny on day one blocks deployments that were fine yesterday, and the team's first reaction is to remove the policy.

Can I enforce naming without Azure Policy?

Yes, and it is worth doing both. Validate names in your pipeline — the batch validator here is the manual version of the same check — so a mistake fails in a pull request instead of at deployment. Policy is the backstop for everything created outside the pipeline.

What is the env.d.ts equivalent for Bicep?

The Bicep export gives you var declarations you can paste at the top of a module. For a reusable setup, put them in a shared naming.bicep module that takes workload, environment and region as parameters and outputs each name, then import it everywhere.

Can I export only part of the catalogue?

Yes — the category filters in the Project suite tab narrow the set before you export, so you can generate just the networking or just the data-platform names for a given landing zone.

Does the CSV export include the rules?

The project CSV contains the generated names with their lengths and scopes. The separate reference CSV contains the whole catalogue: category, resource type, CAF abbreviation, minimum and maximum length, scope, allowed characters and whether the name must be globally unique — useful as an appendix to an internal naming standard.

07. Practice, migration and troubleshooting

We already have inconsistent names. Where do we start?

Not with a rename. Export your current names, run them through the batch validator to see how far the drift goes, then agree the convention and apply it to everything new. Rename only what you were going to recreate anyway. A half-finished renaming project produces two conventions, which is worse than one bad one.

Is it worth renaming existing resources?

Rarely, because most Azure resources cannot be renamed — you recreate and migrate, with downtime and new resource IDs breaking references, RBAC assignments, alerts and dashboards. Reserve it for resources that are genuinely misleading, and do it during a planned migration.

How do I handle names that are too long for storage accounts?

Shorten the workload abbreviation rather than the meaningful segments, and consider dropping the instance for singleton resources. If the estate is large, adopt one short workload code per application — three or four characters — and use the long name only in tags and documentation.

What about resources created by Azure itself?

Managed resource groups from AKS, Databricks or Container Apps, automatic NICs, disks and node resource groups often ignore your convention entirely. Some can be named on creation (the AKS node resource group, for example); the rest should be exempted from your policy rather than fought.

How should I name resources in a hub-and-spoke landing zone?

Use the same pattern with a platform-level environment such as shrd or a connectivity landing-zone project code, so vnet-hub-shrd-weu-001 sits alongside vnet-shop-prod-weu-001. The point is that the hub is visibly platform-owned without being a special case in your tooling.

Should tags replace naming?

No — they complement it. Tags carry ownership, cost centre, data classification and lifecycle, and they can be changed. Names carry identity and appear everywhere tags do not: alert text, log lines, deployment output, the resource ID itself. Most organisations need both, and a policy that enforces required tags alongside the naming policy.

My deployment failed with “The storage account named X is already taken”.

That name exists somewhere in Azure — possibly in another company's subscription. It is not a permissions problem. Add the unique suffix option, or extend the workload segment. This is the single most common naming failure in a first deployment.

A name passed validation but Azure still rejected it.

Two likely causes: it is a globally unique type and the name is taken, or it contains a reserved word or trademark that Microsoft blocks on public endpoints. Neither can be checked from a browser. Test with az storage account check-name or the equivalent availability API before committing to a name.

Why does my Windows VM name get cut to 15 characters?

Because the operating system computer name cannot be longer. The Azure resource can carry a longer name, but the machine inside will not match it — and monitoring, domain join and certificates all see the short one. Select the Windows VM entry in the catalogue to design against the real limit.

How do I document the convention for my team?

Export the Markdown table for a worked example, download the reference CSV as an appendix, and include a share link that reproduces your exact pattern. A convention that only exists in a wiki paragraph gets interpreted differently by everyone; one that exists as a link, a table and a policy does not.

Does this replace the Azure naming tool in the portal?

There is no naming generator in the portal — Microsoft publishes the guidance as documentation. This tool turns that documentation into something you can generate, validate and enforce, which is the part that usually gets skipped.

Which browsers are supported?

Any current version of Chrome, Edge, Firefox, Safari, Brave, Opera or Vivaldi, on desktop or mobile. There are no external libraries — the page is self-contained, which is also why it keeps working offline.