Resource tagging in Microsoft Azure is a feature introduced with Azure Resource Manager (ARM). Resource tagging enables you to attach multiple key/value pairs to resources for categorization and management.
In Microsoft Azure you can place tags on individual ARM based resources or you can place tags on the resource group level. You cannot place tags on resources created under the Azure Service Manager (ASM / classic) model.
Tags are commonly used for charge-back purposes in large organizations. In these cases, resources are tagged with a cost center or some other identifier that would relate the resource back to the entity which should be charged for the usage of the resource. These tags will then show up in the enterprise Azure usage report.
Although there is a resource group field in the usage report, not all of the resource types return the resource group name to the Azure usage reporting system. This means that you cannot rely on the resource group name field in the usage report as a way to monitor usage for all resources in that group.
When working with tagging it is import to remember:
- You can only tag resources created through the Azure Resource Manager (ARM). Classic resources created through Azure Service Manager (ASM) cannot be tagged.
- If you place tags at the resource group level, those tags will not be automatically placed on all resources within that group. There is no tag inheritance, however, you can use a scheduled PowerShell task to copy tags from the resource group to all ARM based resources in that group.
- The Azure usage report does have a field for Resource Group Name. It may be tempting to use a resource group name as a way to identify resources for charge-back. This will not work because not all resources output their resource group to the Azure usage report.
Below are a few additional resources which I find valuable when working with resource tagging: