Resource Management provides the tag inheritance feature for associated resources. When you manage the tags of a primary resource or establish relationships between the primary resource and other resources, this feature enables the associated resources of the primary resource to automatically inherit the tag changes that are made to the primary resource. This improves O&M efficiency and reduces tag management costs. For example, when you add a tag to or remove a tag from an Elastic Compute Service (ECS) instance, the tag is automatically added to or removed from the cloud disks, elastic network interface (ENI), and elastic IP address (EIP) of the ECS instance. When you attach a cloud disk to the ECS instance, bind an ENI to the ECS instance, or associate an EIP with the ECS instance, the cloud disk, ENI, or EIP automatically inherits the tags of the ECS instance.
Limits
For information about the resource types that support the tag inheritance feature, see Resource types that support the tag inheritance feature.
If you select "Specific Tag Keys" for a type of resource when you configure a tag inheritance rule, you can specify a maximum of 50 tag keys.
After you enable the tag inheritance feature and configure a tag inheritance rule for a type of resource, the existing tag of a resource of this type is overwritten if the key of the tag that you specify is the same as the key of the existing tag. For example,
cost:hangzhou
is an existing tag of an associated resource, andcost:shanghai
is added to the primary resource of the associated resource. If you select "Specific Tag Keys" for the associated resource and specify the tag keycost
when you configure a tag inheritance rule, the existing tagcost:hangzhou
of the associated resource is overwritten bycost:shanghai
.The tag inheritance feature cannot enable an existing associated resource to inherit the existing tags of the primary resource. If you want to allow an existing associated resource, such as a cloud disk, a snapshot, or an EIP, to inherit the existing tags of the primary resource before you enable the feature, you can use a public template provided by CloudOps Orchestration Service (OOS). For more information, see Use OOS to inherit tags from ECS instances for the resources of the ECS instances at a time.
Basic operations
Enable the tag inheritance feature and configure a tag inheritance rule
Log on to the Resource Management console.
In the left-side navigation pane, choose
.Read the instructions, select the check box for creating a service-linked role, and then click Enable and Configure Rules.
When you enable the tag inheritance feature, the system creates the AliyunServiceRoleForTag service-linked role. The role is used to perform tag-related operations on associated resources. For more information, see Service-linked role for Tag.
Configure tag inheritance rules for associated resources and click OK.
You can set the tag inheritance scope for different types of associated resources to All Tag Keys or Specific Tag Keys.
Modify a tag inheritance rule
Log on to the Resource Management console.
In the left-side navigation pane, choose
.In the upper-right corner of the page that appears, click Edit to modify a tag inheritance rule.
Click OK.
Disable the tag inheritance feature
After you disable the tag inheritance feature, the system no longer performs tag-related operations on associated resources. Tags that are inherited by existing associated resources are not affected.
Log on to the Resource Management console.
In the left-side navigation pane, choose
.In the upper-right corner of the page that appears, click Disable.
In the message that appears, click OK.
Resource types that support the tag inheritance feature
Primary resource type | Associated resource type | Description | Rule name |
ECS instance | Cloud disk (including data disks and system disks) |
|
|
ENI (including primary ENIs and secondary ENIs) |
|
| |
EIP |
| rule:AssociateEip-UnassociateEip-TagInstance:Ecs-Instance:Vpc-Eip | |
Cloud disk | Snapshot |
|
|
ApsaraMQ for Kafka instance | Topic |
|
|
Consumer group |
|
| |
Container Service for Kubernetes (ACK) cluster | Security group | If you modify the existing tags of an ACK cluster, the related security group automatically inherits the tag changes that are made to the cluster. |
|
ECS instance |
|
| |
Server Load Balancer (SLB) instance | If you modify the existing tags of an ACK cluster, the related SLB instance automatically inherits the tag changes that are made to the cluster. |
| |
EIP | If you modify the existing tags of an ACK cluster, the EIP of the ACK cluster automatically inherits the tag changes that are made to the cluster. |
| |
NAT gateway | If you modify the existing tags of an ACK cluster, the related NAT gateway automatically inherits the tag changes that are made to the cluster. |
| |
Scaling group | If you modify the existing tags of an ACK cluster, the related scaling group automatically inherits the tag changes that are made to the cluster. |
|
Regions in which the tag inheritance feature is available
Indonesia (Jakarta), Malaysia (Kuala Lumpur), China (Hohhot), Singapore, Germany (Frankfurt), US (Virginia), US (Silicon Valley), China (Hong Kong), China (Qingdao), Japan (Tokyo), China (Zhangjiakou), China (Shenzhen), China (Beijing), China (Shanghai), China (Hangzhou), China (Chengdu), UK (London), China (Heyuan), China (Ulanqab), China (Guangzhou), Philippines (Manila), Thailand (Bangkok), China (Nanjing - Local Region), and China (Fuzhou - Local Region).