Skip to content

Shortform intrinsic functions not working in YAML templates #223

@geerlingguy

Description

@geerlingguy

I've converted my moonshot templates from JSON to YAML using aws-cfn-template-flip, and when I'm creating new infrastructure using moonshot create, I get errors like:

--> CREATE_FAILED QueueSecurityGroup The vpc ID 'VpcId' does not exist

This seems to occur because I'm using the short form of the Ref function, like so:

VpcId: !Ref VpcId

If I convert all my templates to use the more verbose/annoying full function form, like:

VpcId:
  Ref: VpcId

Then it seems to work.

Is moonshot reformatting the YAML before sending it across the CloudFormation? The templates in CloudFormation's UI seem to show that any of the short form functions are stripped out (e.g. it shows VpcId: VpcId, which is obviously going to fail...).

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