A quick and Easy Way to Add Renamable Display Names to Azure Resources 💨

In this post I will share a couple of tips with regards to Secrets Management in your (local) dev environment. Personally I use these to prevent / limit leaking of secrets while developing Azure infrastructure. And I consider them as part of my security hygiene during the development process.

Last year I wrote a series of posts covering the naming convention topic. The perfect azure naming convention covered the Azure resources. The primary concept for this naming convention is that in fact Azure resource names are actually ID’s which cannot be renamed. In this post I want to share a method with which renamable display names can be added.

How to add renamable display names to Azure resources

There should be little surprise that the renamable display name is a resource tag. In this specific case it’s a special (hidden) tag called hidden-title. When this tag is added it’s value is used as the display name for the resource in question in the Azure portal. Even if the tag is hidden it can be still set using the Azure portal, but it disappears in the portal as soon as you leave the tags page. To change the value via the portal, add it again with the new value then wait a minute and do a Forced Reload (Ctrl F5). Naturally adding this tag is also possible using infrastructure as code (Bicep, Terraform, ARM, etc…) or scripting (PowerShell, Azure CLI, etc…). Check out the following images to see both approaches and their result.

Renamable display names via the portal
Renamable display names via scripting
Renamable display names result

For convenience a snippet of the above used code.

Did I also mention that this also works on resource groups?

Yes, it also works on resource groups
Keep in mind that since the display name is a tag the limitations that apply to the tags are applicable.

By now you are probably wondering if is this a supported feature? Yes its a supported feature, but the main purpose of this feature is to provide resource display names for Azure dashboards views. And to make sense of data in dashboards the same display names are also made visible in the Azure portal. The documentation for this feature is unfortunately similarly to the tag itself, hidden…. So I dug the links up for your convenience, check them out here and here .

Practical applications

I am still firmly convinced a proper naming convention is a must for any Cloud environment and Azure resource names should be treated as ID’s due to their immutable nature. However this is a good addition which can help smoothen the transition for any organization from a traditional pets to a cattle approach without sacrificing pet names 😉.

No real dogs where harmed as this image is AI generated


UPDATE 2023-09-07
Due to lots of interest for this topic some questions arose with regards to possible limitations, therefore I decided to add this chapter.

I have experimented with different views and identified a couple of limitations. The first one is in the main search (located at the top of the screen) and the second one is in the Tags and Tags filter.

When using a part or the full value of the hidden-title tag in the main search window, the tagged resources are shown in the search results but the display names added via the hidden-title tag are only visible in the mouseover. Check out the next image, it contains two examples of this limitation.

Search works but not as expected

Tags en Tags filters

For the Tags and tags filtering this functionality does not support tags prefixed with hidden-. Check out the next image, it contains the examples of these limitations.

Limitations are mostly present in the Tags views and commands

Wrapping up

I hope you found this neat trick to add renamable display names to Azure resources useful. If you are interested in the reference material used to make this post, please visit the following links.

As always, a big thanks for reading this post. If you liked it, don’t be shy and have a look at my other posts .