Provider | Maximum number | Maximum key length | Maximum value length | Key regex |
---|---|---|---|---|
AWS | 50 | 128 | 256 | ^(?!aws:)[\+\-=\._:\/\@\ a-zA-Z0-9]{1,128}$ 1 |
Google Cloud | 64 | 63 | 63 | ^[a-z][-_a-z0-9]{1,62}$ |
Azure | 50 | 512 | 256 | ^[^<>%&\\\?\/]{1,512}$ |
1 Different services may have varying restrictions
Always consult official documentation (linked below).
If multiple cloud providers are involved, the following format is recommended: recommended-label-format
.
- Both keys and values must be Unicode characters in UTF-8
- Tag keys and values are case-sensitive
- International characters are allowed
- Not all resource types support tags (See Tag support for Azure resources)
- Storage account limits are different
- AWS:
- Google Cloud:
- Azure: