This topic describes the managed rule that is related to the tags attached to your resources and the rectification methods that target at non-compliant resources.

Rule name: required-tags

Cloud Config checks whether the specified tags are attached to your resources, and sends you a notification if a non-compliant resource is found. The required-tags rule supports all Alibaba Cloud core infrastructures, such as Elastic Compute Service (ECS) instances, Alibaba Cloud Container Service for Kubernetes clusters, ApsaraDB for RDS instances, ECS disk and storage, Apsara File Storage NAS, Apsara File Storage for HDFS, virtual private clouds (VPCs), ECS security groups, Server Load Balancer (SLB) instances, Object Storage Service (OSS) buckets, ECS snapshots, ECS Dedicated Hosts (DDHs), PolarDB clusters, and ApsaraDB for MongoDB instances.

Trigger type: configuration change

Input parameters:

tag1Key. It specifies the key of a required tag.

tag1Value. It specifies the optional value of a required tag.

Non-compliance description: A resource under your account does not have the tags that you specify. You can use one of the following methods to rectify resource non-compliance:
  • Rectification method 1: Attach the missing tags specified in the input parameters to the resource.

    For more information about how to attach the specified tags to your ECS instances, see Create or bind a tag.

  • Rectification method 2: Change the values of the input parameters to make sure that the resource has the tags specified in the input parameters. Submit the edits and click Re-evaluate on the details page of the rule.

    To add the tags attached to your ApsaraDB for RDS instances to the values of the input parameters, perform the following steps:

    1. View the tags attached to your ApsaraDB for RDS instances in the ApsaraDB for RDS console.
      1. Log on to the ApsaraDB for RDS console.
      2. In the left-side navigation pane, click Instances.

        On the Instances page, view the tags that are attached to your ApsaraDB for RDS instances.

    2. Add the tags to the values of the input parameters in the Cloud Config console.

      For more information, see Modify a rule.