cloudtools / troposphere

troposphere - Python library to create AWS CloudFormation descriptions
BSD 2-Clause "Simplified" License
4.93k stars 1.45k forks source link

How do you define a stack-level tag on a cloudformation stack? #2081

Closed sgoudham closed 1 year ago

sgoudham commented 2 years ago

Hi, I'm wanting to add/propagate tags to all resources underneath a single cloudformation stack, it looks like AWS has the idea of a stack-level tag which automatically tries to add/propagate the tag to every single resource.

Relevant AWS Docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html?icmpid=docs_cfn_console Screenshot from AWS Clouformation Console image

Unfortunately, after scouring the documentation of troposphere, I'm still not able to find any relevant documentation on how to add this in the template. I was only able to find documentation for defining tags on singular resources.

So... is there any way to define a stack-level tag on a cloudformation stack?

markpeek commented 1 year ago

I have not seen a way to define stack-level tags in the template itself. I believe you have to do that via the CLI or console when deploying the stack.

sgoudham commented 1 year ago

Oh okay, thanks!