简体   繁体   中英

Pass json file of tags in Cloudformation

I have several tags that need to be added to several resources in cloudformation. I need to make my template file smaller so instead of having to tag everything with the 9ish different tags each time, I'd like to pass them in a json file so that I can just reference that each time instead of doing each individual tag. Is this even possible?

Something like:

Tags: !Ref "tags"

Maybe you could have a look at tag propagation in cloudformation:

All stack-level tags, including automatically created tags, are propagated to resources that AWS CloudFormation supports.

You can do this by creating a transformation macro within CloudFormation.

To do this you will need to create a Lambda that is able to be passed input (such as file name) and have it generate an output. This will then be returned whenever you call the macro from within your CloudFormation template.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM