The following codesnippet:
AWSTemplateFormatVersion: '2010-09-09'
Description: Some CloudFormation template
Resources:
MyResourceName:
Type: AWS::SSM::Parameter
Properties:
Name: myParameterName
Type: String
Value: "somevalue"
Tags:
- Key: firstTagName
Value: firstTagValue
- Key: secondTagName
Value: secondTagValue
generates the following error in CloudFormation:
How should I structure the Tags property correctly?
As shown in the examples of https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html.
The structure the Tags property varies by Resource (see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
For AWS::SSM::Parameter
Use key-value pairs instead of a Map:
AWSTemplateFormatVersion: '2010-09-09'
Description: Some CloudFormation template
Resources:
MyResourceName:
Type: AWS::SSM::Parameter
Properties:
Name: myParameterName
Type: String
Value: "somevalue"
Tags:
firstTagName: firstTagValue
secondTagName: secondTagValue
This fixed my problem.