← All posts

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

RegionCode
Sweden Centralswc
Korea Centralkrc
West Europeweu
East USeus
South Central USscus

Common resource type abbreviations

ResourcePrefixExample
Resource grouprg-rg-app-prod-swc-001
Virtual networkvnet-vnet-hub-prod-swc-001
App Serviceapp-app-shop-prod-swc-001
Function appfunc-func-billing-prod-swc-001
AKSaks-aks-shop-prod-swc-001
Postgres Flexpsql-psql-shop-prod-swc-001
Redisredis-redis-shop-prod-swc-001
Key Vaultkv-kv-shop-prod-swc-001
Storage accountst (no hyphen)stshopprodswc001
Container Registrycr (no hyphen)crshopprodswc001

The "must be exactly this" subnets

  • AzureFirewallSubnet
  • AzureFirewallManagementSubnet
  • AzureBastionSubnet
  • GatewaySubnet

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 az create time.
  • Key Vault is global within tenant. Suffix with -001, -002 early, you'll need it.
  • App Service and Function App names are global URLs. Same suffix rule.
Chat with my AI