Virtual Datacenter Concept | 1 of 10 | Naming Conventions

This blogpost is part of a series of Azure Virtual Datacenter Concept blog posts.

Let’s talk about one of the key pilars from the Azure Governance scaffold: naming conventions

Azure Governance - Naming conventions

Understanding which resource, what is does and where it is located

Naming standards and conventions have been around for decades.
They are commonly used to identify objects and are used in most industries.

Let’s take car manufacturer BMW as an example, their cars are named with certain key characteristics in mind.

BMW 118D Hatch
Brand = BMW
Motorization = 1800 CC
Fuel Type = Diesel
Bodywork = Hatch (5 doors)

Pretty simple example on how a well defined naming standard can immediately give you the necessary info about a certain object. In essence, that’s why naming conventions are used.

Azure Naming conventions

As with regular industry naming conventions, standardizing the way you define your Azure Resources is crucial.

Microsoft has a predefined set of “policies” that need to be met with regards to naming your resources, the following docs article gives you an overview on how naming standards can be applied.

Below you can find a couple of commonly used resources that need to be uniquely identified globally across Microsoft Azure.

! We will need some kind of generalization to keep our resources unique
EntityScope
API managementGlobal
Key vaultGlobal
Function appGlobal
Web appGlobal
Storage account name (data)Global
Storage account name (disks)Global
Data Lake StorageGlobal
Container registryGlobal
Service Bus namespaceGlobal
Event Hubs namespaceGlobal
Log Analytics WorkspaceGlobal

Taking the above information into account, we’ve generated a set of scripts that allow you to easily define a naming policy.

Input variables

To start building our naming conventions we first need a couple of input variables that are unique to our setup.

#####################################################################################
#
# This script provides you with an overview of all naming conventions that are being used in the Virtual Datacenter Concept
# Version: 0.1
# Author: Yannick Dils
#
#####################################################################################

#####################################################################################
#
# Below is a set of variables that is being used in order to populate the naming conventions
#
#####################################################################################


# Variable abbreviation for the resource group that will be used for central shared services
$RG_PurposeHUB = "hub" 

# Variable abbreviation for the resource group that will be used for production workloads
$RG_PurposePRD = "prd"

# Variable abbreviation for the resource group that will be used for acceptance workloads
$RG_PurposeACC = "acc"

# Variable abbreviation for the resource group that will be used for test workloads
$RG_PurposeTST = "tst"

# Variable abbreviation for the resource group that will be used for development workloads
$RG_PurposeDEV = "dev"

# Variable abbreviation for the customer / environment
$Cus = "<proj>"

# Variable abbreviation for the resource location
$Location = "weu"

# Variable which provides the desired resource location
$FullLocation = "WestEurope"

# Variable abbreviation for the resource owner
$owner = "YD"

# Variable abbreviation for the environment tier
# 1 : HUB + PRD
# 2 : HUB + PRD + ACC
# 3 : HUB + PRD + ACC + TST
# 4 : HUB + PRD + ACC + TST + DEV
$EnvironmentTier = "4"

# Variable required for resource generalization
$Guid = [guid]::NewGuid()
$MyGUID = $Guid.Guid.Remove(8)

#####################################################################################
#####################################################################################




Resource Groups

Resource group naming conventions are provided as per below. A resource group should be able to clearly define the customer or project, the type of environment and the purpose of the resources that are being created in the resource group.

Customer or project (3 letter abbreviation) Tier (3 letter abbreviation of the Tier, HUB; PRD, TST, ACC, DEV)   Purpose (Resource Group Purpose Abbreviation) Resource Purpose
<proj> hub identity rg

Powershell script
$HUBRGID = $Cus + '-' + $RG_PurposeHUB + '-' + 'identity' + '-rg'

Networking

Networking related naming conventions are provided as per below. In order to be able to perform smart discovery over your networking resources, Virtual Networks (VLANs), Subnets, Network Security Groups are named according to the endpoints and services that are located in the specified network topology.

Virtual Networks
Customer or project (3 letter abbreviation) Tier (3 letter abbreviation of the Tier, PRD, TST, ACC, DEV) Location (3 letter abbreviation of the location) Resource Purpose
<proj> hub weu vn
Powershell script
$virtualnetworkHUBname = $Cus + '-' + $RG_PurposeHUB + '-' + $Location + '-vn'

Subnets
Customer or project (3 letter abbreviation) Tier (3 letter abbreviation of the Tier, PRD, TST, ACC, DEV) Subnet purpose Resource Purpose
<proj> hub identity sn
Powershell script
$hubsubnetname1identity = $Cus + '-' + $RG_PurposeHUB + '-' + 'identity' + '-sn'

Network Security Groups
Customer or project (3 letter abbreviation) Tier (3 letter abbreviation of the Tier, PRD, TST, ACC, DEV) Subnet purpose Resource Purpose
<proj> hub identity nsg
Powershell script
$hubnsgid = $Cus + '-' + $RG_PurposeHUB + '-' + 'identity' + '-' +'nsg'

Public IP addresses
Public IP usage Public IP abbreviation
resourcename pip
Powershell script
$vmpip = $VirtMachName + '-pip'

Load Balancing

Azure provides several cloud native load balancing solutions, as with other Azure Resources, they require a logical naming convention.

Internal Load Balancer
Internal Load Balancer Purpose
ilbadfs
ilbsql
Powershell script
$adfsintlb = 'ilb-' + 'adfs'

External Load Balancer
External Load Balancer Purpose
elbadfswap
elbrdgw
Powershell script
$adfsextlb = 'elb-' + 'adfswap'

General Compute Resources

Compute resources contain virtual machines, availability sets, storage and everything related to the infrastructure you need to run your apps.

Storage Accounts
Storage AccountRedundancy levelCustomer AbbreviationLocationTierPurpose
stlrs<proj>weuprdlogs
Powershell script
$SA_Logs = 'stlrs' + $Cus + $location  + $RG_PurposeHUB + 'logs'

Availability Sets
Customer AbbreviationTierPurposeResource Purpose
<proj>hubsqlas
Powershell script
#$hubavsql = $Cus + '-' + $RG_PurposeHUB + '-' +  'sql' + '-' + 'as'

Virtual Machines
Customer AbbreviationLocationOptional Tier Purpose##
<proj>weuprdsql01
Powershell script
$VMShortName = "sql01"
$VirtMachName = $Cus.ToLower() + $location.ToLower() + $RG_PurposePRD + $VMShortName

Virtual Machine Disks
Virtual Machine NameDisk drive letter
<vmname>c
<vmname>e
Powershell script
$OSDiskName = $VirtMachName + '-c'

Summary

In this blogpost, we’ve provided some guidance with regards to naming conventions and standards. The powershell “script” provided can be used for your convenience. In the upcoming series of posts we will be re-using these variables in order to build our Virtual Datacenter Concept topology.

Checkout our previous blogpost to recap on the Virtual Datacenter Concept.

What’s next?

The following aspects of the virtual datacenter concept will be highlighted in the following upcoming posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Please reload

Please Wait