Tag propagation

更新时间:
复制 MD 格式

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 specify k1:v2 when you call CreateStack, the final tag for resource A is k1: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 specify k1:v2 when you call CreateStack, the final tag for resource A is k1: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:v1 and you specify the tag k2:v2 when you call CreateStack, the final tags for resource A are k1: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)

ALIYUN::CDN::Domain

Cloud Enterprise Network (CEN)

ALIYUN::CEN::CenInstance

Cloud Firewall

ALIYUN::CLOUDFW::AddressBook

Container Service for Kubernetes (ACK)

Elastic Container Instance (ECI)

ALIYUN::ECI::ContainerGroup

Alibaba Cloud DNS

ALIYUN::DNS::Domain

Cloud-native distributed database PolarDB-X

ALIYUN::DRDS::DrdsInstance

Elastic Compute Service (ECS)

Alibaba Cloud Elasticsearch

ALIYUN::ElasticSearch::Instance

Auto Scaling

ALIYUN::ESS::ScalingGroup

Function Compute (FC)

ALIYUN::FC::Service

Message Queue for Apache Kafka

ALIYUN::KAFKA::Instance

ApsaraDB for MongoDB

File Storage NAS

ALIYUN::NAS::FileSystem

CloudOps Orchestration Service (OOS)

Object Storage Service (OSS)

ALIYUN::OSS::Bucket

Tablestore

ALIYUN::OTS::Instance

ApsaraDB RDS

ApsaraDB for Tair (Redis-compatible)

Message Queue for Apache RocketMQ

ALIYUN::ROCKETMQ::Instance

Serverless App Engine (SAE)

ALIYUN::SAE::Application

Smart Access Gateway (SAG)

ALIYUN::SAG::CloudConnectNetwork

Server Load Balancer (SLB)

Simple Log Service (SLS)

ALIYUN::SLS::Project

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