Help Center/ Config/ User Guide/ Resource Compliance/ Built-In Policies/ General Policies/ Resources Have All the Specified Tags Attached
Updated on 2025-08-25 GMT+08:00

Resources Have All the Specified Tags Attached

Rule Details

Table 1 Rule details

Parameter

Description

Rule Name

required-all-tags

Identifier

required-all-tags

Description

If a resource is missing any of the specified tags, this resource is non-compliant.

Tag

tag

Trigger Type

Configuration change

Filter Type

Supported Services and Resources

Rule Parameters

  • TagKeys: indicates the specified tag keys.
  • TagValues: Indicates the specified tag values.

Application Scenarios

After a company migrates to the cloud, the number of resources created on the cloud keeps increasing. Some large enterprises may have hundreds of thousands or millions of resources. 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) helps you 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 TagValues is an empty list and a resource has a specified tag key, the resource is considered attached with the tag key.
  • If TagValues is not empty and a resource has a specified tag key and a tag value specified in TagValues, the resource is considered attached with the tag key.
  • If a resource has all the specified tag keys attached, the resource is compliant.
  • If a resource does not have all the specified tag keys attached, the resource is non-compliant.