Resource Management provides the Associated Resource Tagging feature. 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 Associated Resource Tagging feature, see Resource types that support the Associated Resource Tagging feature.
If you select "Specify some tag keys" for a type of resource when you configure an associated resource tagging rule, you can specify a maximum of 50 tag keys.
After you enable the Associated Resource Tagging feature and configure an associated resource tagging 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 "Specify some tag keys" for the associated resource and specify the tag keycost
when you configure an associated resource tagging rule, the existing tagcost:hangzhou
of the associated resource is overwritten bycost:shanghai
.The Associated Resource Tagging 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 Associated Resource Tagging 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 Associated Resource Tagging feature and configure an associated resource tagging rule
Log on to the Resource Management console.
In the left-side navigation pane, choose
.On the Associated Resource Tag Settings page, read the feature description and select the check box for creating a service-linked role.
When you enable the Associated Resource Tagging 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.
Click Enable and set rules.
In the upper-right corner of the Associated Resource Tag Settings page, click Edit and configure an associated resource tagging rule.
You can change the tag inheritance scope for different types of associated resources.
Click OK.
Modify an associated resource tagging rule
Log on to the Resource Management console.
In the left-side navigation pane, choose
.In the upper-right corner of the Associated Resource Tag Settings page, click Edit to modify the desired associated resource tagging rule.
You can change the tag inheritance scope for different types of associated resources.
Click OK.
Disable the Associated Resource Tagging feature
Log on to the Resource Management console.
In the left-side navigation pane, choose
.In the upper-right corner of the Associated Resource Tag Settings page, click Turn off this feature.
In the Confirm message, click OK.
After you disable the Associated Resource Tagging feature, the system no longer performs tag-related operations on associated resources. Tags that are inherited by existing associated resources are not affected.
Resource types that support the Associated Resource Tagging feature
Primary resource type | Associated resource type | Description |
ECS instance | Cloud disk (including data disks and system disks) |
|
ENI (including primary ENIs and secondary ENIs) |
| |
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 Associated Resource Tagging 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).