I have a rather complex set of CloudFormation templates that I use for provisioning the different environments of our infrastructure. However I recently got the request to tag t
You can easily reuse tags if you don't pass them to the template but instead reference them during deployment. The tags will be propagated to all ressources of the stack. A command similar to the one below might meet your needs:
aws cloudformation create-stack --stack-name mystack \
--template-body file://my_template.yaml --tags file://my_tags.json
The file my_tags.json is of the format
[
{"Key": "mytag", "Value": "val"},
...
]
Alternatively, you could deploy your stack through CodePipeline and define the tags in the template configuration