Azure Naming Conventions what do you do?

Kdes

Well-Known Member
Joined
Aug 21, 2007
Messages
158
Reaction score
3
Hi All

Started our move to Azure, the one thing i noticed is that it is very tricky to get a decent naming convection that can cover all resources. Which i also soon discovered you simply cant, because of the complex amount of resources and each having their own 'rules.'
After reading and researching a number of sources online. Found that there is simply no way to cover all and it all depends on your scenario.

I'm thinking of going;
<company unit>-<environment>-<workload>-<number>-<resource>

Dont need to show region cause we will only ever use two at very most. Location is also always show on the portal.
We do have multiple company units, which need their own resources at times.
Keep it short as possible.
All lower case
Keep it simple as possible

Examples;
contoso-prd-webservers-rg
contoso-prd-hub-1-vnet
acme-dev-iis-rg
acme-prd-wvdspoke-1-vnet
acme-prd-wvdspoke-1-nsg
acmepsql1vm
acmedsql1vm
contosoprdcdnst

What you guys think? How are you doing your naming conventions?

Thanks
 
Last edited:
Thanks Da-Lion-619. Out of interest do you use Azure. What is your naming convention. Do you go uppercase or lowercase on your names?
 
Thanks Da-Lion-619. Out of interest do you use Azure. What is your naming convention. Do you go uppercase or lowercase on your names?
All lowercase, there's multiple factors that can affect naming that I've seen.
Normally it's about responsibility, like the entire team can use the resources but I'm responsible for creating or changing SKUs. Sometimes you might have to do your naming to help the accounting people out etc.

I normally work with web aspects and mostly PaaS.
A resource group is logical so there's no restriction on the resource that goes into it, so I normally use it for my environment.
{env}-{domain}-rg
dev-mybroadband-rg

This way if I wanna remove the dev env, I just delete the entire resource group, likewise I can also place a lock on production. For resources I normally use,
{env}-{domain}-{location}-{type}
dev-mybroadband-neu-db

Not all resources have a location even if they show one in the portal such as Traffic Manager, they also might have replication already catered for such as a Storage Account so I only create one.
If I need another instance in another location then the naming takes care of that,
dev-mybroadband-weu-db

The last thing where naming helps is Managed Identities, all the resources in dev can access other resources in dev without needing to configure a username/password or secrets etc.
 
Adding vnet as is obviously a vnet is an anti pattern. Same with the resource group.
 
Then there also when services gets created automatically that is a dependent on something else. The names are in inconsistent.

Is there a way to control how the names are automatically assigned. For example force all names to be lowercase regardless if they manually or automated?
 
Then there also when services gets created automatically that is a dependent on something else. The names are in inconsistent.

Is there a way to control how the names are automatically assigned. For example force all names to be lowercase regardless if they manually or automated?
When creating via the portal, you can create a copy of the template which might help.
 
You can setup naming conventions via policy in Azure...

But in all honesty, Tags are your better friend in terms of being able to identify resources...
 
Top
Sign up to the MyBroadband newsletter
X