This is a quick one: We all know that using Azure Resource Tags is a key element in a company’s governance strategy. Tags are used on resources to ensure you stay in control (e.g. to set an owner, department or environment), for cost management (e.g. to configure a cost center or customer) or any other purposes. Resource tags come with some limitations and it’s important to understand those. One of these limitations is the max. number of tags per resource which by the time of writing is 15. Using JSON-formatted tag values can help companies to overcome this limit.

Tags are name/value pairs. A simple trick to store more or more complex values is to use a JSON-formatted string. That allows to store much more tags and also gives you additional flexibility. Let’s use a “CostCenter” tag as a simple example here. Imagine you want to split costs of a resource between 2 or more different cost centers. using tags. You can easily solve this by using a JSON-formatted value and store two cost center objects in an array.

Once needed, you can extract the JSON-string and use the name/values from the array in your billing procedure (or for whatever you want to use the data). Using the Azure CLI you can easily access the tags of a resource.