One of the key governance tools in Microsoft Azure is the use of resource tags. These key-value pairs help you organize, manage, automate, and track the lifecycle of your resources. They’re crucial for cost management, compliance, and operational insight.
However, like everything else in life (especially cloud), tags also come with limits and restrictions you should be aware of when designing your tagging strategy.
Let’s look at some of the most essential naming size limits and restrictions that apply to Azure Tags:
- Maximum number of tags per resource
- Each resource or resource group can have up to 50 tags.
- These must all have unique tag names (keys) — the values can repeat, but the keys cannot.
Tip: If you need more complex metadata per resource, consider encoding structured data in CSV or JSON within a tag value — but be careful with readability and limits.
- Tag Length Limits: Excessive length can hinder usability.
- The maximum number of characters for a tag name is 512.
- The maximum number of characters for a tag value is 256.
- Reserved tag name prefixes: Azure reserves certain prefixes for internal use. You cannot use these words at the start of a tag name:
Azure
Windows
Microsoft
- Additional restrictions to keep in mind:
- Tag names are case-insensitive:
Environment
,environment
, andENVIRONMENT
are all treated as the same key - Tag values are case-sensitive:
Prod
,prod
, andPROD
are three different values. - No automatic inheritance: Tags do not inherit from the resource group to the resources. This needs to be enforced via Azure Policy or automation.
- Tag names are case-insensitive:
Tip: Tagging is free: You’re not charged for using tags — but managing them poorly can cost you in other ways (hello, misattributed costs and chaos).
Resource tagging is one of those simple things that can make or break your cloud hygiene. Following naming best practices and being aware of these constraints will help you build better automation, cleaner governance, and more accurate cost reports.
Tag smart — because your future self will thank you when it’s time to debug billing reports or enforce policies.
Did you know all these limits? Are you enforcing them with Azure Policy? Let me know in the comments or reach out if you want help automating your tagging framework!
See you next Friday for another cloud fact!
To lazy to read? We’ve got you covered! Check out our video version of this content!
Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for my son!