If you specify a tag for a stack when you create or update the stack by calling an API operation, Resource Orchestration Service (ROS) propagates 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 specify thek1:v2
tag for 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 specify thek1:v2
tag for 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 has no tags 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 specify thek2:v2
tag for 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. When you call the TagResources operation to add tags to a stack, tags are not propagated.
Resource types that support tag propagation in an ROS stack
Alibaba Cloud service | Resource type |
API Gateway | |
Alibaba Cloud CDN (CDN) | |
Cloud Enterprise Network (CEN) | |
Cloud Firewall (CFW) | |
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 | |
Message Queue for Apache Kafka | |
ApsaraDB for MongoDB | |
File Storage NAS (NAS) | |
CloudOps Orchestration Service (OOS) | |
Object Storage Service (OSS) | |
Tablestore | |
PolarDB | |
ApsaraDB RDS | |
ApsaraDB for Redis | |
Message Queue for Apache RocketMQ | |
Serverless App Engine (SAE) | |
Smart Access Gateway (SAG) | |
Server Load Balancer (SLB) | |
Log Service | |
Virtual Private Cloud (VPC) |
Resource types that support tag propagation in a Terraform stack
For more information, see the "Resources that support user tag propagation of stacks" section of the Supported resources topic.