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 of 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. On the Create Rule page, find the rule named required-tags and click Apply Rule.
  5. In the Properties step, specify Rule Name, Risk Level, and Description. You can also keep the default values for these parameters. Then, click Next.
  6. In the Assess Resource Scope step, select the resource types that you want to monitor and click Next.
    In this example, ECS, EIP, OSS, and RDS are selected.
  7. In the Parameters step, configure the specified values for the specified keys. Then, click Next.
  8. In the Modify step, select Modify and select a correction method. Then, click Next.
    The following correction methods are supported:
    • 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.
  9. In the Preview and Save step, click Submit.
  10. Find the newly created rule and click Details in the Actions column. Then, you can view the details of the rule.
    • 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
    • On the Correction Details tab, view the correction results.

      If corrections are performed, the specific tags are automatically 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.