When using Azure Resource Manager deployment model the administrator can use Tags, which helps to organize resources and categorize them in a simple way.
The tag feature is only available on the Azure Resource Manager deployment model and using PowerShell, and besides of the categorization benefit, we can also use the same tags on the billing reports.
Before starting using the Tags, these following points can help to use better the tag resource.
- Create a consistent standard for your Tags
- Pay attention for spaces, a tag “ServiceOwner” and “Service Owner” are two different tags because of the space between the words
- You have to type in the Tags (including Key and Value) on new objects (Resource Groups, VMs and etc), the existent ones are not listed
The tags are exposed on the Azure Preview Portal, in the example below we are checking a specific resource group called azana-rg-exchange, and then we can click on Tags icon located on the right-upper side of the blades, and the new blade is where we can define the key and its value.
A best practice is to keep consistency of the tags among all resources, for this Tutorial we re going to use a couple of keys to identify the service, such as CostCenter, Department, Owner and ServiceName.
After defining the Tags, the administrator can click on Browse and then click on Tags. A list of all existent tags will be listed.
When we click on any given Tag a new blade will show up on the right side with all resources that have that tags.
If we click on a different Tag (in the example below Owner: Anderson Patricio) we can see that tag was used in two different Resource Groups and they are listed on the right side.
Another way to use Tags, is to click on … and pin them to the dashboard.
This way by clicking on the tag the administrator has easy access to all resources associated to that tag.
Tags and the billing report…
Another benefit of using tag is the ability to use them on the billing report, and by doing that we can charge back a specific service based on Tags. When exporting the usage of the Microsoft Azure, make sure to download the Version 2 – Preview
A csv file will be downloaded, and a column Tags will be available and you can filter using Excel to get the exact cost of any given service/resource associated to a tag.