3
votes

When creating AWS::MSK::Cluster with Cloud Formation I am not able to set Tags in the usual way:

      Tags:
        - Key: Name
          Value: !Ref Identifier

Because of this error:

Property validation failure: [Value of property {/Tags} does not match type {Map}]

As of the time of writing, the documentation states that, instead of the usual Type: List of Tag, I should use: Type: Json.

Also the same documentation states that:

You can specify tags in JSON or in YAML, depending on which format you use for your template

1

1 Answers

6
votes

After further investigation (and AWS support help), the working (only on creation) example looks like this:

Tags:
  Name: !Ref Identifier

Additionally, tags cannot be modified (the docs actually state that tags change require replacement), when tried a slightly confusing error shows up:

CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename kafka-eu-west-1-dev and update the stack again.