This topic describes how to use Cloud Config to search for resources to which specific tags are not added. Cloud Config facilitates resource management.
- Log on to the Cloud Config console.
- In the left-side navigation pane, click Rules.
- On the Rules page, click Create Rule.
- In the Basic Settings step, set Method to Managed Rule, set Managed rule to required-tags, and specify Risk Level. Then, click Next.
- 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.
- 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.Note
The relationship between the threshold pairs is AND. If a pair of thresholds are not reached, Cloud Config considers the resources non-compliant.
- 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.
- In the Complete step, click View Details.
- 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.
- 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.
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.