Tag design rules are management rules. We recommend that you plan and design tags based on the principles and best practices for tag design in this topic. This avoids business loss caused by frequent changes to tag design rules and helps you develop a tag management system that supports sustainable evolution.
Scenarios
Tags can be used to manage, categorize, and search for resources. The resources include personnel, finance, and cloud services. Tags can be used to perform the following operations:
- Search for and manage resources.
- Manage costs and cost allocation.
- Automate operations and maintenance (O&M).
- Control access to resources.
Design principles
The following content describes the design principles:
- Mutual exclusivity
This principle ensures that one resource attribute uses only one tag key. For example, if you have used the tag key
owner
to represent the owner attribute, you cannot use other tag keys such as own or belonger to represent this attribute again. - Collective exhaustion
When you plan resources, you must plan tags and prioritize tag keys. All resources must be bound with planned tag keys and related values. Each key-value pair must be named in a standard format.
Collective exhaustion is a prerequisite for tag-based resource search, cost allocation, automated O&M, and access control.
- Limited values
This principle is used to remove excess tag values and retain only core tag values. It simplifies procedures such as resource management, access control, automated O&M, and cost allocation.
- Considering consequences of future changes
When you plan tags, you must consider the impact of adding or removing tag values that may have in the future. This provides extra flexibility to modify tags.
When you modify tags, tag-based access control, automated O&M, and related billing reports may change. For corporate or individual business, we recommend that you create business-related tags. This way, you can manage resources based on the tags from technical, business, and security dimensions. When you use automated O&M tools to manage resources and services, you can add automation-specific tags to facilitate automation.
- Simplified design
This principle allows you to simplify the use of tag keys by creating dimension-specific tag keys during the tag planning stage. It also reduces operation errors caused by excessive tag keys.
Examples
The following table lists the tag naming examples in common dimensions. We recommend that you use lowercase letters to name tags.
Dimension | Tag key | Tag value |
---|---|---|
Organization |
|
Organization-specific names |
Business |
|
Business-specific names |
Role |
|
|
Purpose |
|
Specific purposes |
Project |
|
Project-related values |
Business department (to implement cost allocation and business tracking) |
|
Department-related values |
Owner from the finance dimension (to identify the resource owner) | owner | Names or emails |
Customer from the finance dimension (to identify the customers that use specific resources) | Custom values or true values | Customer names |
Project from the finance dimension (to identify the projects that are supported by specific resources) | project | Project names |
Order from the finance dimension | order | Order category IDs |