Article
June 29, 2021 · 3 min read timeNaming and labeling resources correctly is a complex task, and the sky blue Microsoft Azure cloud is no exception. Why is a well-defined naming and tagging strategy important then? It helps to locate, identify and manage resources quickly. There are even more advantages in terms of governance, operations management, security, and accounting.
There are only two hard things in Computer Science: cache invalidation and naming things.
Phil Karlton
Whether working on a small in-house project or medium to large customer projects, I always want to get my naming conventions sorted out before progressing too much with the implementation. I try to avoid creating resources with bad names as they are often impossible to change later.
While Azure Docs does have best practices for naming and tagging, it is tough to remember them, and the different naming rules per resource type can get overwhelming. As a result, I find myself doing a repetitive set of search queries like:
“Azure naming conventions”
“Azure location abbreviations”
“Azure resource name abbreviations”
“Azure recommended tags”...
So what if you wouldn’t have to remember all the conventions, recommendations, and naming rules? I decided to solve this time consuming task once and for all by developing a tool for myself and for others to enjoy. Enter AZ Tools, a simple yet powerful web app to handle the remembering and provide a simple way to test your strategy. The web app comes with three tools: Locations, Resources, and Tagging.
I can use the Locations tool to overview Azure locations (or regions) and suggest location codes or abbreviations. An abbreviation or location code is commonly used as part of the resource naming convention to provide important information about the resource hosting region. For example, I could express the West Europe region as westeurope, weeu, euwe, we, or ew. Oh, boy!
When you have a decent idea in which Azure regions your resources will live in, it’s time to step over to the Resources tool. You can create a naming strategy by dragging and dropping, reordering, and configuring predefined naming fragments. Currently, six fragments are available to play around: resource type, application, environment, location, instance number, and random identifier.
Changes are instantly visible and give you a glace to your idea of resource names. For example, you might have an excellent idea for a naming convention only to realize at some point that it doesn’t work for some resource types because it has stricter naming conventions. A validity checker comes in handy to show whether the resource name is compliant with the rules for that particular resource type.
Last but not least, I recommend developing a tagging strategy to support governance, operations, accounting, and overall management of resources. The Tagging tool gives an idea of the recommended and suggested metadata tags commonly used for Azure resources. Tag descriptions with selectable example values are available per tag, or you can write down your own. You get all data presented in simple data tables that can be searched, filtered, ordered, and exported as CSV files so you can easily export your well-defined strategy.
So next time you find yourself thinking about Azure naming and tagging conventions, the az.nitor.app is the only thing you need to remember! :-)
AZ Tools was developed as a Nitor Core project. So what is Nitor Core, you might ask? In short, you can use 10% of your work time to explore, learn, develop and share topics that you are interested in and feel passionate about. For a more thorough introduction on the subject, check out Simo Vuorinen’s post on Nitor Core: The quest for something more & better.