If you add a tag to a stack when you create or update the stack by calling a specific API operation, Resource Orchestration Service (ROS) can propagate the tag to resources that support the tag feature in the stack.
Usage notes
If a resource in a template and the stack to which the resource belongs have the same tag key, the following rules apply:
ROS stack: The tag of the resource in the template is used for the resource. For example, the
k1:v1
tag is defined for Resource A in the template. If you add thek1:v2
tag to the ROS stack to which Resource A belongs when you create the stack by calling the CreateStack operation, thek1:v1
tag is used for Resource A.Terraform stack: The tag of the stack is used for the resource. For example, the
k1:v1
tag is defined for Resource A in the template. If you add thek1:v2
tag to the Terraform stack to which Resource A belongs when you create the stack by calling the CreateStack operation, thek1:v2
tag is used for Resource A.
If a resource in a template does not have a tag but the stack to which the resource belongs has a tag, or if the resource and the stack have different tag keys, the tag of the stack is propagated to the resource. For example, the
k1:v1
tag is defined for Resource A in the template. If you add thek2:v2
tag to the stack to which Resource A belongs when you create the stack by calling the CreateStack operation, thek1:v1 and k2:v2
tags are used for Resource A.Tags can be propagated only when you call the CreateStack operation to create a stack or the UpdateStack operation to update a stack. Tags are not propagated when you call the TagResources operation to add tags to a stack.
ROS resource types that support tag propagation
Alibaba Cloud service | Resource type |
API Gateway | |
Alibaba Cloud CDN (CDN) | |
Cloud Enterprise Network (CEN) | |
Cloud Firewall | |
Container Service for Kubernetes (ACK) | |
Elastic Container Instance | |
Alibaba Cloud DNS (DNS) | |
PolarDB-X 1.0 | |
Elastic Compute Service (ECS) | |
Elasticsearch | |
Auto Scaling | |
Function Compute | |
ApsaraMQ for Kafka | |
ApsaraDB for MongoDB | |
File Storage NAS (NAS) | |
CloudOps Orchestration Service (OOS) | |
Object Storage Service (OSS) | |
Tablestore | |
ApsaraDB RDS | |
Tair (Redis OSS-compatible) | |
ApsaraMQ for RocketMQ | |
Serverless App Engine (SAE) | |
Smart Access Gateway (SAG) | |
Server Load Balancer (SLB) | |
Simple Log Service (SLS) | |
Virtual Private Cloud (VPC) |
Terraform resource types that support tag propagation
For more information, see the "Resources that support propagation of custom stack tags" list in Supported resources section.
References
Use ROS to add tags to or update tags for multiple cloud resources at a time