This topic describes how to use Cloud Config to search for resources to which specific tags are not added. Cloud Config facilitates resource management.

Prerequisites

Make sure that your resource tags comply with the principles for tag design. For more information, see Best practices for tag design.

Procedure

  1. Log on to the Cloud Config console.
  2. In the left-side navigation pane, click Rules.
  3. On the Rules page, click Create Rule.
  4. In the Basic Settings step, set Method to Managed Rule, set Managed rule to required-tags, and specify Risk Level. Then, click Next.
  5. In the Parameter Settings step, select the types of resources that you want to monitor. In this example, ECS, EIP, OSS, and RDS are selected.
  6. In the Parameter Settings section, specify thresholds for tags. Then, click Next.

    In this example, three pairs of thresholds are specified. One indicates the project that is supported by resources, one indicates the resource owner, and another indicates the environment in which the resources run. Each pair contains one tag key threshold and one tag value threshold. The following figure shows the thresholds.

    Parameter Settings section
    Note

    The relationship between the threshold pairs is AND. If a pair of thresholds are not reached, Cloud Config considers the resources non-compliant.

  7. In the Remediation Settings step, specify Remediation Method and click Submit.
    Valid values for Remediation Method:
    • Automatic Remediation: When non-compliant resources are detected, the system automatically corrects the configurations of the resources.
    • Manual Remediation: When non-compliant resources are detected, you must manually correct the configurations of the resources.
    • Disable Remediation: When non-compliant resources are detected, you do not need to correct the configurations of the resources.
  8. In the Complete step, click View Details.
  9. On the Rule Details tab, view the auditing results.

    Cloud Config identifies the resources to which specific tags are not added. The following figure shows the resources.

    Resources to which specific tags are not added
  10. On the Correction Details tab, view the correction results.

    If corrections are performed, the specific tags are added to the resources, as shown in the following figure.

    View correction results

What to do next

Configure Cloud Config to send resource non-compliance events to Message Service (MNS). For more information, see Send notifications of resource events to an MNS topic.