AZ-104 Microsoft Azure Administrator Exam
You're a great admin... on-prem. Now, become a great admin in the cloud and prove it by passing the Microsoft Certified: Azure Administrator Associate exam!
Practice Test

Practice Test

Apply and manage tags on resources
Implement Tagging Strategies
Importance of Tags
Tags are essential elements in Azure that consist of key-value pairs used to classify resources. This classification helps in identifying resources based on organizational needs. For instance, you could use a tag with the key Environment and a value of Production to indicate the deployment environment. Tags play a significant role in organizing resources, optimizing cost management, and enhancing resource governance.
Tag Usage and Recommendations
Tags can be applied to various Azure entities including individual resources, resource groups, and subscriptions, though not to management groups. They are extremely useful for resource organization, cost management, and governance. However, it is important to be cautious when using sensitive values in tags because they can be exposed through different methods as plain text.
Required Access for Tagging
To manage tags effectively, you need write access to the Microsoft.Resources/tags
resource type or access to the resource itself. Two main roles assist with tagging: the Tag Contributor role allows tagging any resource, while the Contributor role permits tagging specific resource types. These roles ensure users can apply tagging strategies according to their responsibilities.
Tag Inheritance and Policy Compliance
It’s important to note that tags are not automatically inherited from parent resources such as resource groups or subscriptions. To ensure resources adhere to certain tagging policies, you can use policy definitions for tag compliance. Tags can simplify cost grouping when using Microsoft Cost Management, making reviewing tagged costs more straightforward without needing additional filters.
Tags and Billing
In Azure, tags commonly serve the purpose of organizing billing data by enabling categorization based on different factors like runtime environment or cost center. To efficiently retrieve tag information associated with billing, users can download usage files from the Azure portal where tags appear under the Tags column if billing tags are supported by the services used.
Limitations of Tags
While tags are versatile, there are several limitations associated with them:
- Not every resource type supports tagging.
- There is a cap of 50 tag name-value pairs per resource, resource group, or subscription.
- Tag names are restricted to 512 characters, whereas tag values can have up to 256 characters.
- Legacy resources like Cloud Services do not support tagging.
- Some resources may only support a minimal number of tags.
Applying Tags with Azure PowerShell
Azure PowerShell is a powerful tool for managing tags. Commands like New-AzTag and Update-AzTag help in applying tags effectively. While New-AzTag replaces all existing tags on a resource, Update-AzTag allows adding new tags through a Merge operation to existing ones. These commands provide flexibility in tag management across resources, resource groups, and subscriptions by using the respective entity identifiers.
Conclusion
Implementing a consistent tagging strategy in Azure is vital for effective management of resources alongside optimized cost allocation and governance. Tags offer the ability to organize resources more efficiently and streamline operations aligning with reporting capabilities. Understanding how tags function, alongside their access requirements and limitations, is crucial to developing a robust tagging strategy that meets organizational needs effectively.