Azure naming · Microsoft.Resources/resourceGroups

rg Resource group

Logical container for resources that share a lifecycle.

Naming constraints

CAF abbreviationrg
Resource typeMicrosoft.Resources/resourceGroups
Length1–90 characters
CaseMixed case
Allowed charactersAlphanumerics, underscores, parentheses, hyphens, and periods. Can't end with a period.
Uniqueness Subscription
SeparatorHyphen
Watch out: Very permissive (90 characters), which tempts inconsistency. Platform services create their own groups (MC_*, ME_*, NetworkWatcherRG, DefaultResourceGroup-*, databricks-rg-*), so exempt those from naming policy.

Source: Microsoft Learn, “Naming rules and restrictions for Azure resources”, checked October 2026. Abbreviation from the Cloud Adoption Framework.

Example & copy-ready

A worked name for workload app, env prod, region weu, instance 001.

Example name
rg-app-prod-weu-001 Valid
Validation regex for CI checks or pre-commit hooks (.NET and JavaScript)
^[A-Za-z0-9_().-]{1,89}[A-Za-z0-9_()-]$
Bicep naming expression
var name = take('rg-${workload}-${env}-${region}-${instance}', 90)
Terraform local
locals {
  name = substr(join("-", compact(["rg", var.workload, var.env, var.region, var.instance])), 0, 90)
}

Azure Policy can't evaluate regular expressions, so a policy can check the rg prefix but not the full format. Run the regex in your pipeline, or audit existing names on a schedule.

Uniqueness scope

Unique within the subscription. Safe to repeat the same name in another subscription.

Open in the name generator