This will be a fun post. I remember in my old server administrator days, I used to love putting a lot of effort into the nomenclature “specification” for our services, servers and other components in the data center. Believe it or not; with Azure Storage you have the same opportunity. In fact, you’ll find out rather quickly that you may effectively be required to make a nomenclature that makes sense for your organization and accounts. Spoiler Alert: This is the first hint; keeping notion of both organization and accounts.
Let’s first start with the rules for an Azure Storage account name. They are documented here and are rather straightforward, quoting:
- Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only.
- Your storage account name must be unique within Azure. No two storage accounts can have the same name.
There are a few things that stand out to me right away. Regardless if they are good or bad, what catches my eye are the following requirements:
- Unique within Azure. All of Azure.
- The maximum character limit of 24 characters for a storage account name
- Only letters and numbers (no characters like: “.”, “_”, “-“, “%”, “!” )
I do not feel this is a limitation; but it becomes something you need to think about when you go to create an account. The hard one will, in my opinion over time, become the unique to Azure part. Here is an egregiously stupid example of me trying to make an account called “azurestorage”:
You’ll see that that name is taken and chances are over time you may run into a situation where you may have a storage account that is taken.
This is where it is a good opportunity to make an Azure storage account nomenclature for your Azure usage. To help with this, I’ve made an Excel Spreadsheet you can download for free to help you make these types of things. The best part is that I’ve figured out the tough (not that tough) Excel text manipulation formula; and this is a good starter for you to deploy consistently in your environment. Here is a view of the sheet:
I made three accounts, in the bottom right: CYLVANOVERRDEVBKP003, CYLVANOVERRPRDWEB101 and CYLVANOVERRPRDWEB102. These, dissected with my nomenclature are:
- Organization: Check Your Logs
- Account: Vanoverr (Matches a username in some organizations)
- Dev or Prod: Made one of each
- Service: I made one Backup and two Web accounts
- Sequence: It’s the 3rd backup account and the two web accounts are working together for an application’s design
This is a fun and easy way to create storage account names that gives you a number of immediate benefits of being consistently named, thought about a bit and most importantly they always become self-describing when you are doing cleanup later.
I hope this post was helpful and if you liked it, please share. As I mentioned last week, I’m happy to announce that I have been accepted as speaker at Experts Live in Singapore and preparing some good content for that event. I also wanted to give a thanks to the Azure Weekly Newsletter; many of the blog posts here have been picked up in the Storage section; but if you use Azure this newsletter does a great weekly roundup from the web. I recommend you subscribe!