Help Center/ Tag Management Service/ Best Practices/ Principles for Naming Tags
Updated on 2023-10-11 GMT+08:00

Principles for Naming Tags

Principles

For enterprises that have migrated to the cloud, they typically have to manage hundreds of thousands or millions of resources within one account and the total resources are keeping increasing. If these resources are classified manually, it is not only difficult but inefficient. To tackle this issue, a cloud service that can enable automatic cloud management is required.

Huawei Cloud provides you with TMS to enable you to classify and group resources by using tags. You can tag resources by their attributes, such as by department, region, or project.

Use standardized tag names

Classifying resources by using standardized tag names can facilitate automatic and efficient cloud management.

A standardized tag name should meet the following requirements:

  • Use a consistent case, such as lower case or upper case, for all tag keys and values.
  • If Chinese characters are used in a tag name, you are advised to limit the characters to six to avoid exceeding the upper limit.

Use consistent and concise tag names

You are advised to use only one name for the same attribute. For example, if the word "purpose" has been used to indicate resource utility, you should avoid using other words, such as "use" or "object", to indicate resource utility.

At the same time, a name can only be used for one attribute.

Plan and predefine tags in advance

When you are planning to create resources, plan and predefine their tags in parallel, especially tag keys. Then you can use the predefined tags to classify your resources.

Avoid containing privacy information

A tag name should avoid containing enterprise privacy information, such as names of confidential projects, project revenue information, phone numbers, or email addresses.

Samples

The following table lists some tag naming samples. You are advised to use lowercase letters for all tag keys and values.

Category

Key

Value

Organizational structure

headquarters

subcompany

department

team

group

Corresponding names

Service architecture

product

module

service

microservice

Corresponding names

Roles

role

user

network administrator

audit administrator

operational administrator

development personnel

test personnel

Purpose

purpose

Corresponding utility

Project and environment

project

task

environment

Project-related values

Cost attribution

costcenter

businessunit

Department-related costs

Order

order

Order ID