All Products
Search
Document Center

Resource Management:Enable automatic tag inheritance from a resource group

Last Updated:Jun 03, 2026

Resources created in or added to a resource group automatically inherit specified tags from that group.

Background

Supported services are listed in the Support for automatic tag inheritance from a resource group column of Alibaba Cloud services that support tag policies.

Procedure

Both Current Account and resource directory tag policies support automatic tag inheritance for resource groups. In this example, a Current Account tag policy attaches the tag env:test to a resource group. The env:test tag then automatically propagates to the ECS instances in that group.

  1. Add a tag to the resource group.

    This example adds the tag env:test to the resource group. Add a tag to a resource group.

  2. Enable the tag policy feature.

  3. Create a tag policy.

    1. On the Policy Library page, click Create Tag Policy.

    2. Enter a Policy Name.

    3. Enter a Policy Description.

    4. Configure the policy in Quick Mode.

      1. Set Policy Scenario to Automatically Inherit Tags for Resources from Resource Groups.

      2. In the Tag Key field, enter env.

      3. Select Specify Resource Types for Detection, and then specify all resource types for ECS.

        By default, the policy detects all supported resource types. Select this option to limit detection to specific types.

      4. Select Resource Groups, click Select Resource Group, and then select the resource group that you tagged in Step 1.

        Note
        • A Current Account tag policy applies to all resource groups by default. You can limit the scope to a maximum of 20 resource groups.

        • A resource directory tag policy applies to all resource groups by default. You cannot limit the scope to specific resource groups.

      5. To exclude specific resources within the specified resource groups, select Specify IDs of Resources to Be Excluded, click Specify Resource IDs, and then enter the resource IDs to exclude.

        Note

        You can enter a maximum of 20 resource IDs to exclude.

    5. Click Create.

  4. Attach the tag policy.

    1. In the list of tag policies, find the policy you created in Step 3 and click Bind in the Actions column.

    2. In the Bind dialog box, click OK.

      The tag policy takes effect for the current Alibaba Cloud account and its RAM users.

  5. After a short delay, verify that the tag policy has taken effect.

    The ECS instances in the resource group are automatically tagged with env:test, confirming the tag policy is in effect. If the resource group has other tags not specified in the policy, those tags are not inherited.

    Note

    A tag policy takes effect after a short delay described in Limitations.