kristofwillen / cfntagger

Mass tag resources in Cloudformation templates
GNU General Public License v3.0
4 stars 0 forks source link

Incorrect parameters definitions for resource of type AWS::SSM::Parameter #14

Closed theksi closed 1 year ago

theksi commented 1 year ago

Hello, I went through an issue when deploying a cfn template after it was processed by cfntagger. The error encounterred was

Property validation failure: [Value of property {/Tags} does not match type {Map}] After cfntagger process the template, the definition for this resource was

APolicyArnParameter:
Type: AWS::SSM::Parameter
Properties:
Description: APoliciyArnParameter
Name: !Ref APolicyParameterName
Type: String
Value: !Ref ADeployPolicy
Tags:
- Key: CostCenter
Value: xxxx
- Key: Application
Value: xxxx-vmmgmt
- Key: Owner
Value: foo@x.bar
- Key: Environment
Value: production

After investigating this issue, using this link I fixed the issue by manually updating the resource definition like

APolicyArnParameter:
Type: AWS::SSM::Parameter
Properties:
Description: APoliciyArnParameter
Name: !Ref APolicyParameterName
Type: String
Value: !Ref ADeployPolicy
Tags:
CostCenter: xxxx
Application: xxxx-vmmgmt
Owner: foo@x.bar
Environment: production
kristofwillen commented 1 year ago

Unreproducable here; cfntagger runs fine on this template with tags in either format. Are you sure the error originates from cfntagger, and not from the cloudformation deployment (maybe later in your CI/CD pipeline) ? -- just checking

Will test further.

In the meantime, can you provide me with your versions of the following python modules:

kristofwillen commented 1 year ago

Ah, I see your issue here: tag format generated by cfntagger is allways a list, where some resources demand a json structure.

insert something very mean about cloudformation here

Added to the v0.10 roadmap

kristofwillen commented 1 year ago

Implemented in v0.10.0, will be released soon. (branch merge auto closed this issue)