CAF Naming Convention in Practice: A Cheat Sheet From a Real Project
Microsoft publishes the Cloud Adoption Framework naming guide. Here's how it actually looks when you apply it to a working multi-region project.
The Microsoft CAF naming pattern is
<type>-<workload>-<env>-<region>-<instance>.
Easy to remember, harder to apply consistently when you're shipping fast.
Here's a real-world subset I use.
Region codes
| Region | Code |
|---|---|
| Sweden Central | swc |
| Korea Central | krc |
| West Europe | weu |
| East US | eus |
| South Central US | scus |
Common resource type abbreviations
| Resource | Prefix | Example |
|---|---|---|
| Resource group | rg- | rg-app-prod-swc-001 |
| Virtual network | vnet- | vnet-hub-prod-swc-001 |
| App Service | app- | app-shop-prod-swc-001 |
| Function app | func- | func-billing-prod-swc-001 |
| AKS | aks- | aks-shop-prod-swc-001 |
| Postgres Flex | psql- | psql-shop-prod-swc-001 |
| Redis | redis- | redis-shop-prod-swc-001 |
| Key Vault | kv- | kv-shop-prod-swc-001 |
| Storage account | st (no hyphen) | stshopprodswc001 |
| Container Registry | cr (no hyphen) | crshopprodswc001 |
The "must be exactly this" subnets
AzureFirewallSubnetAzureFirewallManagementSubnetAzureBastionSubnetGatewaySubnet
These are hard-coded by Azure. Any deviation breaks the resource.
The friction-points worth knowing
- Storage and ACR can't take hyphens. Bake that into the naming script, don't argue with it at
azcreate time. - Key Vault is global within tenant. Suffix with
-001,-002early, you'll need it. - App Service and Function App names are global URLs. Same suffix rule.