When you create or update a stack by calling an API, Resource Orchestration Service (ROS) propagates any specified tags to each resource in the stack that supports tags.
Usage notes
If a tag defined in the template has the same key as a stack tag:
For a ROS stack, the tag defined for the resource in the template is used. For example, if the tag for resource A in the template is
k1:v1, and you specifyk1:v2when you call CreateStack, the final tag for resource A isk1:v1.For a Terraform stack, the tag specified for the stack is used. For example, if the tag for resource A in the template is
k1:v1, and you specifyk1:v2when you call CreateStack, the final tag for resource A isk1:v2.
If a resource in a template has no tags, or if the tag keys of the resource and the stack are different, the stack tags are propagated to the resource. For example, if resource A in the template has the tag
k1:v1and you specify the tagk2:v2when you call CreateStack, the final tags for resource A arek1:v1,k2:v2.Tag propagation occurs only when you create or update a stack by calling CreateStack or UpdateStack. Tags attached to a stack by calling TagResources are not propagated.
ROS resource types that support tag propagation
Alibaba Cloud service | Resource type |
API Gateway | |
Content Delivery Network (CDN) | |
Cloud Enterprise Network (CEN) | |
Cloud Firewall | |
Container Service for Kubernetes (ACK) | |
Elastic Container Instance (ECI) | |
Alibaba Cloud DNS | |
Cloud-native distributed database PolarDB-X | |
Elastic Compute Service (ECS) | |
Alibaba Cloud Elasticsearch | |
Auto Scaling | |
Function Compute (FC) | |
Message Queue for Apache Kafka | |
ApsaraDB for MongoDB | |
File Storage NAS | |
CloudOps Orchestration Service (OOS) | |
Object Storage Service (OSS) | |
Tablestore | |
ApsaraDB RDS | |
ApsaraDB for Tair (Redis-compatible) | |
Message Queue for Apache 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 a list of resources that support the propagation of custom stack tags, see Supported ROS resources.
References
Attach or update tags for cloud resources in batches using Resource Orchestration Service