Find resources that are missing specified tags

Updated at:

This topic explains how to use Cloud Config to find resources that lack specified tags, which simplifies resource management.

Prerequisites

Ensure that your resource tags comply with design principles. For more information, see Tagging best practices.

Procedure

  1. Log on to the Cloud Config console.

  2. In the left-side navigation pane, choose Compliance & Audit > Rules.

  3. On the Rules page, click Create Rule.

  4. On the Creation Method page, select Based on managed rule, choose the required-tags rule from the template, and then click Next.

  5. On the Set basic properties page, configure the rule name, parameters, risk level, trigger, and description, and then click Next.

  6. On the Set effective scope page, set the resource type and click Next.

    You can define the evaluation scope by excluding resources based on their resource ID, resource group, region, and tag.

    In this example, to find ECS, EIP, OSS, and RDS resources that are missing the specified tags, select these as the resource types.

  7. On the Set remediation page, configure whether to perform remediation, and then click Submit.

    You can enable the SettingsRemediation switch and follow the prompts to configure template-based or custom remediation. For more information about how to configure remediation, see Overview of remediation settings.

  8. In the Actions column for the target rule, click Details.

    • On the Detection Results tab, view the compliance results of your resources.

      Cloud Config has identified the resources that are missing the specified tags.

      Filter the results by setting the Compliance status to Non-compliant. The list displays all non-compliant resources, including resource types such as ECS automatic snapshot policy and ECS security group. For each resource, you can click Configuration timeline, Compliance timeline, or Remediation.

    • On the Remediation detail tab, view the remediation execution results.

      If you configured remediation, Cloud Config automatically adds the required tags to the non-compliant resources.

      In the execution results list, you can filter remediation records by using the Execution result drop-down list. The table includes the Resource ID, Resource type, Execution time, Execution result, and Reason columns. For example, for resources of type ECS automatic snapshot policy and ECS security group, the execution result is Succeeded and the Reason column is blank.

Next steps

You can configure Cloud Config to send resource non-compliance events to Simple Message Service (formerly MNS). For more information, see Configure data delivery to Simple Message Service (formerly MNS).