Sei sulla pagina 1di 10

Naming conventions for

Azure resources

Author: Amitkumar Singh

Version: 1.0
Date:
[DOCUMENT TITLE]

1 Contents

1 Introduction.................................................................................................................. 3
1.1 Purpose ........................................................................................................................................ 3

2 Naming Principals ....................................................................................................... 3

3 Naming Limitations in Azure ....................................................................................... 4

4 Naming Identifier ......................................................................................................... 4


4.1 Subscriptions ................................................................................................................................ 6

4.2 General ......................................................................................................................................... 7

4.3 Compute ....................................................................................................................................... 7

4.4 Storage ......................................................................................................................................... 8

4.5 Networking.................................................................................................................................... 8

4.6 Containers .................................................................................................................................. 10

4.7 Service Bus ................................................................................................................................ 10

BLAZECLAN 2
[DOCUMENT TITLE]

1 Introduction
1.1 Purpose

This document is a summary of the naming rules and restrictions for Azure resources and a baseline set of
recommendations for naming conventions. You can use these recommendations as a starting point for own conventions
specific to your needs.

The choice of a name for any resource in Microsoft Azure is important because:

 It is difficult to change a name later.


 Names must meet the requirements of their specific resource type.
 Consistent naming conventions make resources easier to locate. They can also indicate the role of a resource in a
solution.

The key to success with naming conventions is establishing and following them across your applications and organizations.

2 Naming Principals
The naming pattern must support easy application level grouping for show back/charge back billing when required.

Constraints: Some resources are constrained by their identifier length, and case sensitivity

The convention MUST Describes type of resource in the subscription.

Constraints: Some resources must be uniquely named across entire Azure.

The establishment of good name standard before you implementing different types of resources is imperative, as it
can be difficult, or sometimes impossible to rename them afterwards.

BLAZECLAN 3
[DOCUMENT TITLE]

Azure will try to automatically create various resources. For example Virtual Machine Disks and Network Interfaces
will still be named poorly. However, they can be named properly by using ARM templates, Powershell, Azure API
or CLI.

It is unlikely that if we follow these rules for global naming that we will run into any naming conflicts with other Azure
users. However, the chance still exists, so you need a strategy for coping with such conflicts.

3 Naming Limitations in Azure


Azure has a number of constraints, which are implemented at different scopes, and must be considered while naming
resources. Most of them are documented under Microsoft Naming conventions documentation.

Some important limitations worth mentioning:

Scope: Resources: Constraint:


Alpha-Numeric Storage Account Name Cannot have dash, dot
Azure Cloud SQL Server Name, Storage Account Name Must be unique across Azure not just subscription
Length Search Service and Virtual Machines 2 to 15 characters
Lower Case Storage Account Name Cannot be upper characters

4 Naming Identifier
An identifier can refer to different aspects that describe the particular resources and are eminent for building a good naming
convention.

When naming resources in Azure, it is recommended to use common prefixes or suffixes to identify the type and context of
the resource. It is important to clearly specify whether the affix is at the beginning of the name (prefix) or at the end (suffix).

Affixes can refer to different aspects that describe the particular resources. The following table shows some examples
typically used.

BLAZECLAN 4
[DOCUMENT TITLE]

Aspect Example Notes


Environment dev, prod, QA Identifies the environment for the resource
Location uw (US West), ue (US East) Identifies the region into which the resource is deployed
Instance 1, 2, ... For resources that have more than one named instance such as
VMs or NICs.
Product or service Identifies the product, application, or service that the resource
Service supports
Role sql, web, messaging Identifies the role of the associated resource

A list of some Azure services that can be identified by an abbreviation.

BLAZECLAN 5
[DOCUMENT TITLE]

Resource/Service: Short Code:


Subscription sub
Resource Group rg
Virtual Machine vm
Availability Set avs
Virtual Network vnet
Subnet sub
Public IP Address pip
Network Security Group nsg
Storage Account stg
Traffic Manager tm
Load Balancer lb
Application Gateway agw
App Service svc
Key Vault kv
App Service Plan asp
Sql Database sdb
Sql Server sql
Disk dsk
DNS Zone dns
Log Analytics loa
Logic App log
Network Interface nic

4.1 Subscriptions
When naming Azure subscriptions, verbose names make understanding the context and purpose of each subscription clear.
When working in an environment with many subscriptions, following a shared naming convention can improve clarity.

A recommended pattern for naming subscriptions is:

<Company> <Department (optional)> <Product Line (optional)> <Environment>


 Company would usually be the same for each subscription. However, some companies may have child companies
within the organizational structure. These companies may be managed by a central IT group. In these cases, they
could be differentiated by having both the parent company name (ABC) and child company name (XYZ).

 Department is a name within the organization that contains a group of individuals. This item within the namespace
is optional.

 Product line is a specific name for a product or function that is performed from within the department. This is typically
optional for internal-facing services and applications. However, it is highly recommended to use for public-facing
services that require easy separation and identification (such as for clear separation of billing records).

BLAZECLAN 6
[DOCUMENT TITLE]

 Environment is the name that describes the deployment lifecycle of the applications or services, such as Dev, QA,
or Prod.

Company Dept Product Line or Env Full Name


Name Service
ABC SocialGaming AwesomeService Production ABC SocialGaming AwesomeService Production
ABC SocialGaming AwesomeService Dev ABC SocialGaming AwesomeService Dev
ABC IT InternalApps Production ABC IT InternalApps Production

ABC IT InternalApps Dev ABC IT InternalApps Dev

4.2 General

Suggested
Entity Scope Length Casing Valid Characters Pattern Example
Resource Subscription 1 - 90 Case Alphanumeric, <service short profx-prod-rg
Group insensitiv underscore, name>-
e parentheses, hyphen, <environment>-
period (except at rg
end), and Unicode
characters that match
the regex
documented here.
Availability Set Resource 1 - 80 Case Alphanumeric, <service-short- profx-sql-as
Group insensitiv underscore, and name>-
e hyphen <context>-as
Tag Associated 512 Case Alphanumeric, "key" : "value" "department" :
Entity (name), insensitiv special characters "Central IT"
256 e except <, >, %, &, \, ?
(value) , /. See
limitations here.
Web App Global 1 - 60 Case <app_name>- contoso-staging
insensitiv Alphanumeric and <source-slot-
e hyphen name>
API Global 1 - 50 Case <apim-service- contoso
Management insensitiv Alphanumeric and name>
e hyphen

4.3 Compute

Entity Scope Length Casing Valid Characters Suggested Pattern Example

BLAZECLAN 7
[DOCUMENT TITLE]

Virtual Resource 1-15 (Windows), 1- Case Alphanumeric and <name>-<role>- profx-sql-


Machine Group 64 (Linux) insensitive hyphen vm<number> vm1
Function Global 1 - 60 Case Alphanumeric and <name>-func calcprofit-
App insensitive hyphen func

4.4 Storage

Valid Suggested
Entity Scope Length Casing Characters Pattern Example
Storage account Global 3-24 Lowercase Alphanumeric <globally unique profxdata001
name (data) name><number>(use
a function to calculate
a unique guid for
naming storage
accounts)
Storage account Global 3-24 Lowercase Alphanumeric <vm name without profxsql001st0
name (disks) hyphens>st<number>

Container name Storage 3-63 Lowercase Alphanumeric <context> logs


account and hyphen
Blob name Container 1-1024 Case Any URL <variable based on <variable based on
sensitive characters blob usage> blob usage>

Queue name Storage 3-63 Lowercase Alphanumeric <service short awesomeservice-


account and hyphen name>-<context>- messages-001
<num>
Table name Storage 3-63 Case Alphanumeric <service short awesomeservicelogs
account insensitive name><context>

File name Storage 3-63 Lowercase Alphanumeric <variable based on <variable based on
account blob usage> blob usage>

Data Lake Store Global 3-24 Lowercase Alphanumeric <name>dls telemetrydls

4.5 Networking

Valid Suggested
Entity Scope Length Casing Characters Pattern Example

BLAZECLAN 8
[DOCUMENT TITLE]

Virtual Network Resource 2-64 Case Alphanumeric, <service short profx-vnet


(VNet) Group insensitive hyphen, name>-vnet
underscore, and
period
Subnet Parent 2-80 Case Alphanumeric, <descriptive web
VNet insensitive hyphen, context>
underscore, and
period
Network Interface Resource 1-80 Case Alphanumeric, <vmname>- profx-sql1-
Group insensitive hyphen, nic<num> vm1-nic1
underscore, and
period
Network Security Resource 1-80 Case Alphanumeric, <service short profx-app-nsg
Group Group insensitive hyphen, name>-<context>-
underscore, and nsg
period
Network Security Resource 1-80 Case Alphanumeric, <descriptive sql-allow
Group Rule Group insensitive hyphen, context>
underscore, and
period
Public IP Address Resource 1-80 Case Alphanumeric, <vm or service profx-sql1-
Group insensitive hyphen, name>-pip vm1-pip
underscore, and
period
Load Balancer Resource 1-80 Case Alphanumeric, <service or role>-lb profx-lb
Group insensitive hyphen,
underscore, and
period
Load Balanced Load 1-80 Case Alphanumeric, <descriptive http
Rules Config Balancer insensitive hyphen, context>
underscore, and
period
Azure Application Resource 1-80 Case Alphanumeric, <service or role>- profx-agw
Gateway Group insensitive hyphen, agw
underscore, and
period
Traffic Manager Resource 1-63 Case Alphanumeric, <descriptive app1
Profile Group insensitive hyphen, and context>
period

BLAZECLAN 9
[DOCUMENT TITLE]

4.6 Containers

Valid Suggested
Entity Scope Length Casing Characters Pattern Example
Container Global 5-50 Case Alphanumeric <service short app1registry
Registry insensitive name>registry

4.7 Service Bus

Suggested
Entity Scope Length Casing Valid Characters Pattern Example
Service Bus Global 6-50 Case Alphanumeric, hyphen, <service short app1-bus
Namespace insensitive must start with a letter; name>-bus
see here for details.

BLAZECLAN 10

Potrebbero piacerti anche