Resource Group Tags

Tags are a further method of logically grouping resources and resource groups. For example for can give resources in different resource groups the same tag to help with billing and general management.

Tags consist of a name and a value.

Tag Rules;

  • Tags are not inherited, i.e a tag applied to a resource group does not filter down to the groups members.
  • Names can’t contain special characters <,>,%,&,\,?,/
  • You can have up to 15 tags
  • The tag name is limited to 512 characters
  • The tag value is limited to 256 characters

Viewing and adding Tags via the portal

Navigate to the resource group select Tags and enter the required name and value.

Using PowerShell to list a Resource Groups Tags



		


Using PowerShell to add a Tag to a resource group

When you add an additional tag using PowerShell you actually replace all of the current tags with your new tag. Instead of jumping straight into using the Set-AzureRmResourceGroup -Tag command we generally want store the our current tags in a variable and append our new tag. That way we can preserve all of the current tags.



		


Using AzureCLI to list a Resource Groups Tags



		


Using AzureCLI to add a Resource Groups Tag



		


Author: Phil Eddies

I am an IT Operations Manager, managing all aspects of the IT infrastructure and service for a mid sized UK based company. I have been working full time in IT since 2001 in 1st to 3rd line and System Administration roles. MCSA, MCSE, CCNA, Citrix CCA