Updated on 2025-08-25 GMT+08:00

Resource Tag Check

Rule Details

Table 1 Rule details

Parameter

Description

Rule Name

required-tag-check

Identifier

required-tag-check

Description

If a resource does not have the specified tag attached, this resource is non-compliant.

Tag

tag

Trigger Type

Configuration change

Filter Type

Supported Services and Resources

Rule Parameters

  • specifiedTagKey: indicates the tag key. A tag key must be a string.
  • specifiedTagValue: indicates tag values. If the value list is left empty, all values are allowed. A tag value must be an array. You can include up to 10 values.

Application Scenarios

After a company migrates to the cloud, as their cloud resources keep growing, they usually need to manage hundreds of thousands or millions of resources within one account. Manually classifying these resources is difficult and inefficient. To meet this challenge head on, you will need a cloud service to manage resources automatically.

Tag Management Service (TMS) enables you to classify and group resources with tags. You can tag resources by their attributes, such as by department, region, or project. For details, see Principles for Naming Tags.

Solution

Add one or more tags to a single cloud resource or to multiple cloud resources at a time on the TMS console. For details, see Adding Resource Tags.

Rule Logic

  • If specifiedTagValue is empty and a resource has a specifiedTagKey, the resource has the specified tag attached.
  • If specifiedTagValue is not empty and a resource has a specified tag key and a tag value specified in TagValues, the resource has the specified tag attached.
  • If a resource has a specified tag attached, the resource is compliant.
  • If a resource does not have a specified tag attached, the resource is non-compliant.