Skip to content

Mappings in template do not maintain quotes during package step #91

@jolexa

Description

@jolexa

Hello, using aws cloudformation package with the following simple snippet results in the loss of quotes which causes a ChangeSet to remain in CREATE_IN_PROGRESS indefinitely in the proper scenerio.

Mappings:
  '1234567890':
    kmskeys:
      'dev': 'arn:aws:kms:us-east-1:1234567890:key/1234567890-abcdefg-1234-1234'
      'test': 'arn:aws:kms:us-east-1:1234567890:key/1234567890-abcdefg-1234-12345'

after the aws cloudformation package step:

Mappings:
  1234567890:
    kmskeys:
      dev: arn:aws:kms:us-east-1:1234567890:key/1234567890-abcdefg-1234-1234
      test: arn:aws:kms:us-east-1:1234567890:key/1234567890-abcdefg-1234-12345

This is a problem because when using the !Ref "AWS::AccountID" function, a string is returned so it will never match the mapping - if you are mapping per AccountID.

Per the docs, if a Mapping is not used, it is an invalid changeset

So, I'm curious if this is a bug. I feel like I should be able to create a Mapping with Account ID's and then reference the AccountID later in a later block and it is currently not possible with aws cloudformation package. Thoughts?

$ aws --version
aws-cli/1.11.47 Python/2.7.10 Darwin/16.0.0 botocore/1.5.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions