Azure tags help categorize and manage resources using name-value pairs. They provide a consistent way to organize resources and support resource management.
- Categorize resources by project, team, or environment.
- Find resources based on specific tags.
- Track resource usage and costs.
- Identify resources for automated operations.
- Apply consistent tagging practices across projects.
Note: Tag names are case-insensitive, while tag values are case-sensitive.
Add Tags to a Resource in Azure
Step 1: Select any of the Resources in Azure Portal.
Step 2: After selecting the azure resource from the left menu search for tags and Select Tags.
Step 3: Now, from the tags section you can add and remove to organize according to your needs. Here the tags are name/value pairs that enable you to categorize resources and view consolidated billing by applying the same tag to multiple resources and resource groups.Â
Step 4: Once you are done with the changes just click on Apply to make the changes. That's it you are done.
Limitations
- Tags applied to a resource group are not automatically inherited by its resources.
- Azure imposes limits on the number and size of tags that can be assigned.
- Tag values are case-sensitive, which can cause inconsistencies.
- Tags need proper management and governance to remain consistent.
- Tags are mainly used for organization and management and do not directly provide access control.
Resource Tagging  Best Practices
| Best Practice | Description |
|---|---|
| Use Consistent Naming | Follow a standard naming convention for tag names and values. |
| Define Required Tags | Identify mandatory tags such as Environment, Project, and Owner. |
| Use Meaningful Values | Use clear and relevant values that describe the resource. |
| Avoid Duplicate Tags | Prevent multiple tags with similar meanings or inconsistent names. |
| Apply Tags Early | Add tags when resources are created to maintain consistency. |
| Review Tags Regularly | Periodically check and update tags to keep resource information accurate. |
| Automate Tagging | Use Azure Policy or automation to enforce required tags. |
| Use Tags for Cost Tracking | Add tags such as project or department to support cost analysis. |
| Protect Sensitive Information | Avoid storing passwords, secrets, or other sensitive information in tags. |