{"kind":"AgentDefinition","metadata":{"namespace":"community","name":"azure-naming","version":"0.1.0"},"spec":{"agents_md":"---\napplyTo: '**/*.bicep,**/*.tf,**/*.tfvars,**/*.bicepparam,**/infra/**,**/infrastructure/**'\ndescription: 'Azure resource naming conventions based on Microsoft CAF (Cloud Adoption Framework). Use when creating, reviewing, or suggesting names for Azure resources.'\n---\n\n# Azure Resource Naming Conventions (CAF)\n\nSource: [Define your naming convention](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming) | [Abbreviations](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations) | [Name rules](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules)\n\nAlways follow these rules when creating, suggesting, or reviewing Azure resource names.\n\n---\n\n## General Pattern\n\n```\n\u003cresource-type-abbr\u003e-\u003cworkload\u003e-\u003cenvironment\u003e-\u003cregion\u003e-\u003cinstance\u003e\n```\n\n**Component rules:**\n- **Resource type** — use the official abbreviation from the table below, placed first\n- **Workload / app / project** — short descriptive name (e.g., `navigator`, `payments`)\n- **Environment** — `prod`, `dev`, `qa`, `stage`, `test`\n- **Region** — use Azure region short names: `westus`, `eastus2`, `westeurope`, `northeurope`, `uksouth`, `southeastasia`, `australiaeast`, etc.\n- **Instance** — zero-padded number: `001`, `002`\n\n\u003e Some resource types deviate from this pattern (e.g., no hyphens allowed). See [Official Abbreviations and Naming Rules](#official-abbreviations-and-naming-rules) for per-resource patterns and constraints.\n\n**General character rules:**\n- Prefer lowercase letters and hyphens (`-`). No spaces, no underscores unless the resource type requires it.\n- Some resources **do not allow hyphens** — use concatenated lowercase alphanumerics instead (see table).\n- Do not use: `#`, `\u003c`, `\u003e`, `%`, `\u0026`, `\\`, `?`, `/` or control characters.\n- Do not encode sensitive data (subscription ID, tenant ID) in names.\n- Most names are **case-insensitive** in Azure — always compare case-insensitively.\n- Resources with public endpoints cannot include reserved words or trademarks.\n\n---\n\n## Naming Scope\n\n| Scope | Meaning |\n|-------|---------|\n| **Global** | Unique across all of Azure (PaaS with public endpoints) |\n| **Resource group** | Unique within the resource group |\n| **Resource** | Unique within the parent resource |\n\n---\n\n## Official Abbreviations and Naming Rules\n\n### Management and Governance\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Management group | `mg` | tenant | 1-90 | Alphanumerics, hyphens, underscores, periods, parentheses | `mg-platform-prod` |\n| Resource group | `rg` | subscription | 1-90 | Underscores, hyphens, periods, parentheses, letters, digits | `rg-navigator-prod` |\n| Log Analytics workspace | `log` | resource group | 4-63 | Alphanumerics and hyphens | `log-navigator-prod-001` |\n| Application Insights | `appi` | resource group | 1-260 | Can't use: `%\u0026\\?/` | `appi-navigator-prod-001` |\n| Automation account | `aa` | resource group + region | 6-50 | Alphanumerics and hyphens, start with letter | `aa-navigator-prod-001` |\n\n### Networking\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Virtual network | `vnet` | resource group | 2-64 | Alphanumerics, underscores, periods, hyphens | `vnet-shared-eastus2-001` |\n| Subnet | `snet` | virtual network | 1-80 | Alphanumerics, underscores, periods, hyphens | `snet-shared-eastus2-001` |\n| Network security group | `nsg` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `nsg-weballow-001` |\n| Application security group | `asg` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `asg-navigator-prod-001` |\n| Network interface | `nic` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `nic-01-vmnavigator-prod-001` |\n| Public IP address | `pip` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `pip-navigator-prod-westus-001` |\n| Load balancer (internal) | `lbi` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `lbi-navigator-prod-001` |\n| Load balancer (external) | `lbe` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `lbe-navigator-prod-001` |\n| Application gateway | `agw` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `agw-navigator-prod-001` |\n| Firewall | `afw` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `afw-navigator-prod-001` |\n| Firewall policy | `afwp` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `afwp-navigator-prod-001` |\n| Route table | `rt` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `rt-navigator-prod-001` |\n| Virtual network gateway | `vgw` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `vgw-shared-eastus2-001` |\n| VPN Gateway | `vpng` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `vpng-navigator-prod-001` |\n| Azure Bastion | `bas` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `bas-navigator-prod-001` |\n| Private endpoint | `pep` | resource group | 2-64 | Alphanumerics, underscores, periods, hyphens | `pep-navigator-prod-001` |\n| Traffic Manager profile | `traf` | global | 1-63 | Alphanumerics and hyphens (no periods) | `traf-navigator-prod` |\n| ExpressRoute circuit | `erc` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `erc-navigator-prod-001` |\n| CDN profile | `cdnp` | resource group | 1-260 | Alphanumerics and hyphens | `cdnp-navigator-prod-001` |\n| Front Door profile | `afd` | resource group | 5-64 | Alphanumerics and hyphens | `afd-navigator-prod` |\n\n### Compute and Web\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Virtual machine | `vm` | resource group | 1-15 (Windows) / 1-64 (Linux) | No spaces or: `~ ! @ # $ % ^ \u0026 * ( ) = + _ [ ] { } \\| ; : . ' \" , \u003c \u003e / ?` | `vm-sql-test-001` |\n| VM scale set | `vmss` | resource group | 1-15 (Windows) / 1-64 (Linux) | Same as VM | `vmss-navigator-prod-001` |\n| Availability set | `avail` | resource group | 1-80 | Alphanumerics, underscores, periods, hyphens | `avail-navigator-prod-001` |\n| App Service plan | `asp` | resource group | 1-60 | Alphanumeric, hyphens, Unicode | `asp-navigator-prod-001` |\n| Web app | `app` | global | 2-60 | Alphanumeric, hyphens, Unicode. Can't start/end with hyphen. | `app-navigator-prod-001` |\n| Function app | `func` | global | 2-60 | Alphanumeric, hyphens, Unicode. Can't start/end with hyphen. | `func-navigator-prod-001` |\n| Static web app | `stapp` | resource group | — | — | `stapp-navigator-prod-001` |\n| App Service environment | `ase` | resource group | — | — | `ase-navigator-prod-001` |\n\n### Containers\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| AKS cluster | `aks` | resource group | 1-63 | Alphanumerics, underscores, hyphens | `aks-navigator-prod-001` |\n| AKS system node pool | `npsystem` | managed cluster | 1-12 (Linux) / 1-6 (Windows) | Lowercase letters and numbers, can't start with number | `npsystem` |\n| AKS user node pool | `np` | managed cluster | 1-12 (Linux) / 1-6 (Windows) | Lowercase letters and numbers, can't start with number | `npusers` |\n| Container apps | `ca` | resource group | 2-32 | Lowercase letters, numbers, hyphens. Start with letter, end with alphanumeric. | `ca-navigator-prod-001` |\n| Container apps environment | `cae` | resource group | — | — | `cae-navigator-prod-001` |\n| Container instance | `ci` | resource group | 1-63 | Lowercase letters, numbers, hyphens. Can't start/end with hyphen. | `ci-navigator-prod-001` |\n| Container registry | `cr` | global | 5-50 | **Alphanumerics only — no hyphens** | `crnavigatorprod001` |\n\n### Databases\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Azure SQL server | `sql` | global | 1-63 | Lowercase letters, numbers, hyphens. Can't start/end with hyphen. | `sql-navigator-prod-001` |\n| Azure SQL database | `sqldb` | SQL server | 1-128 | Can't use: `\u003c\u003e*%\u0026:\\/?` | `sqldb-navigator-prod` |\n| SQL Managed Instance | `sqlmi` | global | 1-63 | Lowercase letters, numbers, hyphens. Can't start/end with hyphen. | `sqlmi-navigator-prod-001` |\n| Azure Cosmos DB | `cosmos` | global | 3-44 | Lowercase letters, numbers, hyphens. Start with lowercase letter or number. | `cosmos-navigator-prod` |\n| Azure Managed Redis | `amr` | global | 1-63 | Alphanumerics and hyphens. Start/end with alphanumeric. | `amr-navigator-prod-001` |\n| MySQL server | `mysql` | global | 3-63 | Lowercase letters, hyphens, numbers. Can't start/end with hyphen. | `mysql-navigator-prod-001` |\n| PostgreSQL server | `psql` | global | 3-63 | Lowercase letters, hyphens, numbers. Can't start/end with hyphen. | `psql-navigator-prod-001` |\n\n### Storage\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Storage account | `st` | global | 3-24 | **Lowercase letters and numbers only — no hyphens** | `stnavigatorprod001` |\n| Backup vault | `bvault` | resource group | 2-50 | Alphanumerics and hyphens. Start with a letter. | `bvault-navigator-prod-001` |\n\n### Security\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Key vault | `kv` | global | 3-24 | Alphanumerics and hyphens. Start with letter, end with letter or number. No consecutive hyphens. | `kv-navigator-prod-001` |\n| Managed identity | `id` | resource group | 3-128 | Alphanumerics, hyphens, underscores. Start with letter or number. | `id-navigator-prod-001` |\n\n### Integration\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| API Management | `apim` | global | 1-50 | Alphanumerics and hyphens. Start with letter, end with alphanumeric. | `apim-navigator-prod` |\n| Service Bus namespace | `sbns` | global | 6-50 | Alphanumerics and hyphens. Start with letter, end with letter or number. | `sbns-navigator-prod` |\n| Service Bus queue | `sbq` | Service Bus | 1-260 | Alphanumerics, periods, hyphens, underscores, slashes | `sbq-navigator` |\n| Service Bus topic | `sbt` | Service Bus | 1-260 | Alphanumerics, periods, hyphens, underscores, slashes | `sbt-navigator` |\n| Event Hubs namespace | `evhns` | global | 6-50 | Alphanumerics and hyphens. Start with letter, end with letter or number. | `evhns-navigator-prod` |\n| Event hub | `evh` | Event Hubs namespace | 1-256 | Alphanumerics, periods, hyphens, underscores | `evh-navigator` |\n| Logic app | `logic` | resource group | 1-43 | Alphanumerics, hyphens, underscores, periods | `logic-navigator-prod-001` |\n\n### AI and Machine Learning\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Azure OpenAI Service | `oai` | resource group | 2-64 | Alphanumerics and hyphens | `oai-navigator-prod` |\n| AI Search | `srch` | global | — | — | `srch-navigator-prod` |\n| Azure ML workspace | `mlw` | resource group | 3-33 | Alphanumerics, hyphens, underscores | `mlw-navigator-prod` |\n| Foundry hub | `hub` | resource group | 3-33 | Alphanumerics, hyphens, underscores | `hub-navigator-prod` |\n| Foundry hub project | `proj` | Foundry hub | 3-33 | Alphanumerics, hyphens, underscores | `proj-navigator-prod` |\n| Foundry account | `aif` | resource group | 2-64 | Alphanumerics and hyphens | `aif-navigator-prod` |\n| Foundry account project | `proj` | Foundry account | — | — | `proj-navigator-prod` |\n| Foundry Tools (multi-service) | `ais` | resource group | 2-64 | Alphanumerics and hyphens | `ais-navigator-prod` |\n\n### Analytics and IoT\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| Azure Data Factory | `adf` | global | 3-63 | Alphanumerics and hyphens. Start/end with alphanumeric. | `adf-navigator-prod` |\n| Azure Databricks workspace | `dbw` | resource group | 3-64 | Alphanumerics, underscores, hyphens | `dbw-navigator-prod-001` |\n| Azure Data Explorer cluster | `dec` | global | 4-22 | Lowercase letters and numbers. Start with a letter. | `decnavigatorprod` |\n| Azure Synapse workspace | `synw` | global | 1-50 | Lowercase letters, hyphens, numbers. Start/end with letter or number. | `synw-navigator-prod` |\n| IoT hub | `iot` | global | 3-50 | Alphanumerics and hyphens. Can't end with hyphen. | `iot-navigator-prod` |\n| Event Grid topic | `evgt` | region | 3-50 | Alphanumerics and hyphens | `evgt-navigator-prod` |\n\n### Developer Tools\n\n| Resource | Abbr | Scope | Length | Valid Characters | Example |\n|----------|------|-------|--------|-----------------|---------|\n| App Configuration store | `appcs` | global | 5-50 | Alphanumerics and hyphens. No more than two consecutive hyphens. | `appcs-navigator-prod` |\n| SignalR | `sigr` | global | 3-63 | Alphanumerics and hyphens. Start with letter, end with letter or number. | `sigr-navigator-prod` |\n\n---\n\n## Resources That Do NOT Allow Hyphens\n\nThese resources require concatenated lowercase alphanumerics (no separators):\n\n| Resource | Abbr | Pattern |\n|----------|------|---------|\n| Storage account | `st` | `st{workload}{env}{instance}` → `stnavigatorprod001` |\n| Container registry | `cr` | `cr{workload}{env}{instance}` → `crnavigatorprod001` |\n| Azure Data Explorer cluster | `dec` | `dec{workload}{env}` → `decnavigatorprod` |\n\n---\n\n## Examples (CAF)\n\n```\n# Management\nrg-navigator-prod\nrg-webapp-database-dev\n\n# Networking\nvnet-shared-eastus2-001\nsnet-shared-eastus2-001\nnsg-weballow-001\npip-dc1-shared-eastus2-001\nlbe-navigator-prod-001\n\n# Compute\nvm-sql-test-001\nvm-sharepoint-dev-001\nvmss-navigator-prod-001\nasp-navigator-prod-001\napp-navigator-prod-001\nfunc-navigator-prod-001\n\n# Containers\naks-navigator-prod-001\nca-navigator-prod-001\ncae-navigator-prod-001\ncrnavigatorprod001        # no hyphens!\n\n# Databases\nsql-navigator-prod-001\nsqldb-navigator-prod\ncosmos-navigator-prod\npsql-navigator-prod-001\n\n# Storage / Security\nstnavigatorprod001        # no hyphens!\nkv-navigator-prod-001\nid-navigator-prod-001\n\n# Integration\napim-navigator-prod\nsbns-navigator-prod\nevhns-navigator-prod\n\n# Monitoring\nlog-navigator-prod-001\nappi-navigator-prod-001\n\n# AI\noai-navigator-prod\nsrch-navigator-prod\n```\n\n---\n\n## Do NOT Do\n\n- Do not use underscores unless the resource type requires it — use hyphens.\n- Do not spell out the full resource type word (e.g., `storageaccount-myapp` → use `stmyapp001`).\n- Do not use uppercase letters (resources are case-insensitive; lowercase is the convention).\n- Do not include sensitive data (subscription ID, tenant ID, passwords) in names.\n- Do not skip the environment segment — even for production.\n- Do not use `#` — it breaks URL parsing in Azure Resource Manager.\n- Do not use reserved words or trademarks in names for resources with public endpoints.\n- Do not use more than two consecutive hyphens (e.g., `app--prod` is invalid).\n","description":"Azure resource naming conventions based on Microsoft CAF (Cloud Adoption Framework). Use when creating, reviewing, or suggesting names for Azure resources.","import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/blob/541b7819d8c3545c6df122491af4fa1eae415779/instructions/azure-naming.instructions.md"},"manifest":{}},"content_hash":[33,130,202,214,48,86,108,193,204,104,52,169,160,12,102,85,176,52,209,28,212,208,196,66,8,181,123,103,164,148,168,95],"trust_level":"unsigned","yanked":false}
