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 the created resources with a rather extensive list of tags (like 15).
Hardcoding the tags into each of the template file doesn't seem like a good idea to me. I would rather create the list of tags once and refer to them for every taggeable resource. Problem is: I am not even sure this is possible. Do you know of any way that a reusable list of tags can be achieved?
I want to write this:
ECSAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
...
Tags: !Ref ElTags
rather than
ECSAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
...
Tags: !Ref ElTags
- Key: Name
Value: !Join ["-", [!Ref EnvironmentName, 'ecs-as-group'] ]
PropagateAtLaunch: true
- Key: TEAM
Value: !Ref TeamName
PropagateAtLaunch: true