Unlock the Power of AI

1 million free tokens

88% Price Reduction

Activate Now

Propagate a tag

Updated at: 2025-01-14 10:29

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 the k1:v2 tag to the ROS stack to which Resource A belongs when you create the stack by calling the CreateStack operation, the k1: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 the k1:v2 tag to the Terraform stack to which Resource A belongs when you create the stack by calling the CreateStack operation, the k1: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 the k2:v2 tag to the stack to which Resource A belongs when you create the stack by calling the CreateStack operation, the k1: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

Alibaba Cloud service

Resource type

API Gateway

Alibaba Cloud CDN (CDN)

ALIYUN::CDN::Domain

Cloud Enterprise Network (CEN)

ALIYUN::CEN::CenInstance

Cloud Firewall

ALIYUN::CLOUDFW::AddressBook

Container Service for Kubernetes (ACK)

Elastic Container Instance

ALIYUN::ECI::ContainerGroup

Alibaba Cloud DNS (DNS)

ALIYUN::DNS::Domain

PolarDB-X 1.0

ALIYUN::DRDS::DrdsInstance

Elastic Compute Service (ECS)

Elasticsearch

ALIYUN::ElasticSearch::Instance

Auto Scaling

ALIYUN::ESS::ScalingGroup

Function Compute

ALIYUN::FC::Service

ApsaraMQ for Kafka

ALIYUN::KAFKA::Instance

ApsaraDB for MongoDB

File Storage NAS (NAS)

ALIYUN::NAS::FileSystem

CloudOps Orchestration Service (OOS)

Object Storage Service (OSS)

ALIYUN::OSS::Bucket

Tablestore

ALIYUN::OTS::Instance

ApsaraDB RDS

Tair (Redis OSS-compatible)

ApsaraMQ for 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 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

  • On this page (1)
  • Usage notes
  • ROS resource types that support tag propagation
  • Terraform resource types that support tag propagation
  • References
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare