Naming Resources
Date | Version | Changes |
---|---|---|
2021-11-18 | v1.0.0 | Adding examples of good and bad resource names. |
The Azure Resource Naming tool will help you create a name that follows this convention.
1.1 Resource names MUST follow this format
{project}-{component}-{environment}-{resource-type}
1.2 Resource names MUST be in lowercase
1.3 Resource names SHOULD be in kebab case, unless prohibited by Azure resource naming restrictions.
1.4 Component part of resource name MAY be excluded when project only has one component.
1.5 Azure automatically created resources SHOULD NOT be renamed to match this naming convention.
Following sections references individual parts of the resource name format.
2 Project
2.1 Project MUST be the name of the project or application.
2.2 Project MUST NOT include information that is redundant like company name, unless that is part of the project name.
2.3 Project SHOULD be abbreviated when exceeding 20 characters, but the abbreviation MUST be easy to understand without domain specific knowledge.
Examples
intranet (good)
volvo-intranet (bad, redundant company name)
configurator (good)
car-configuration-tool (bad, too long)
3 Component
3.1 Component MUST be included when project has several components.
3.2 Component SHOULD be no longer than 5 characters.
3.3 Component SHOULD be abbreviated with known abbreviations like web, api.
3.4 Component SHOULD not refer to an infrastructure resource.
Examples
web (good, website)
bi (good, business intelligence)
db (bad, refers to an infrastructure resource)
payment (bad, too long use psp instead which is a known abbreviation)
4 Environment
4.1 Environment MUST be specified in the resource name.
4.2 Environment SHOULD be dev
, test
, stage
, prod
.
4.3 Custom environments MUST be added when base environments are not enough.
Specifier | Environment |
---|---|
dev | Development |
test | Test |
stage | Staging |
prod | Production |
5 Resource Type
5.1 Official Microsoft resources MUST use abbreviation from recommended abbreviations for Azure resource types.
5.2 Custom resource type abbreviation MUST be used for non-Microsoft resources.