Naming pattern
Cloud Adoption Framework (CAF) style — components separated by hyphens where the resource type allows them:
<type>-<workload>-<environment>-<region>-<instance>
| Example | Meaning |
|---|---|
rg-payments-prod-weu-001 |
Resource group, payments workload, production, West Europe |
vnet-hub-prod-weu-001 |
Hub virtual network |
kv-payments-dev-weu-001 |
Key vault (watch the 24-char limit) |
stpaymentsprodweu001 |
Storage account — no hyphens allowed, so the pattern collapses |
Keep environment (prod/test/dev) and region tokens short and consistent; the pattern is worthless if half the team writes westeurope and half writes weu.
Recommended abbreviations (CAF)
| Resource | Abbrev | Resource | Abbrev | |
|---|---|---|---|---|
| Resource group | rg- |
AKS cluster | aks- |
|
| Virtual network | vnet- |
Container registry | cr |
|
| Subnet | snet- |
Container instance | ci- |
|
| Network security group | nsg- |
Container app | ca- |
|
| Public IP address | pip- |
Container apps environment | cae- |
|
| Network interface | nic- |
SQL server (logical) | sql- |
|
| Route table | rt- |
SQL database | sqldb- |
|
| Virtual machine | vm |
Cosmos DB account | cosmos- |
|
| VM scale set | vmss- |
Redis cache | redis- |
|
| Load balancer (internal) | lbi- |
Log Analytics workspace | log- |
|
| Load balancer (external) | lbe- |
Application Insights | appi- |
|
| Application gateway | agw- |
Key vault | kv- |
|
| Virtual network gateway | vgw- |
Storage account | st |
|
| Local network gateway | lgw- |
Recovery Services vault | rsv- |
|
| Azure Firewall | afw- |
Automation account | aa- |
|
| Bastion | bas- |
Data Factory | adf- |
|
| NAT gateway | ng- |
Event Hubs namespace | evhns- |
|
| App Service (web app) | app- |
Service Bus namespace | sbns- |
|
| Function app | func- |
API Management | apim- |
|
| App Service plan | asp- |
Managed identity (user-assigned) | id- |
|
| Static web app | stapp- |
Front Door profile | afd- |
Full list: search "abbreviation recommendations for Azure resources" on Microsoft Learn.
Constraints worth memorising
| Resource | Length | Character rules | Globally unique? |
|---|---|---|---|
| Storage account | 3–24 | Lowercase letters and numbers only — no hyphens | Yes (DNS name) |
| Key vault | 3–24 | Alphanumerics and hyphens; start with a letter, end alphanumeric, no consecutive hyphens | Yes (DNS name) |
| Resource group | 1–90 | Alphanumerics, underscores, parentheses, hyphens, periods; cannot end with a period | No (per subscription) |
| Virtual network | 2–64 | Alphanumerics, hyphens, underscores, periods | No |
| VM (Windows computer name) | 1–15 | No special DNS-hostile characters | No |
| VM (Linux computer name) | 1–64 | — | No |
| Web app / function app | 2–60 | Alphanumerics and hyphens; no leading/trailing hyphen | Yes (*.azurewebsites.net) |
| Container registry | 5–50 | Alphanumerics only — no hyphens | Yes (*.azurecr.io) |
| SQL server (logical) | 1–63 | Lowercase letters, numbers, hyphens; no leading/trailing hyphen | Yes (*.database.windows.net) |
| Cosmos DB account | 3–44 | Lowercase letters, numbers, hyphens | Yes (*.documents.azure.com) |
| AKS cluster | 1–63 | Alphanumerics, underscores, hyphens; start/end alphanumeric | No |
| Log Analytics workspace | 4–63 | Letters, numbers, hyphens; start/end alphanumeric | No |
Traps
- Anything that becomes a DNS name (storage, key vault, ACR, web apps, SQL, Cosmos) is globally unique across all of Azure — bake in an org token or expect collisions.
- Storage accounts and container registries reject hyphens, so your hyphenated pattern needs a collapsed variant. Decide it up front.
- Most resource names are immutable — renaming means recreate-and-migrate. Get the convention right before the first production deployment.
- Case: Azure preserves the case you type for most names but compares many of them case-insensitively; sticking to lowercase everywhere avoids surprises.
- Don't encode data that changes (owner, cost centre) in names — use tags for that.