Skip to content

cfn.getTemplate may return YAML instead of JSON #196

@rreusser

Description

@rreusser

It appears that cfn.getTemplate may return JSON or YAML, but L126 in lookup.js presumes that it is necessarily JSON. I am trying to deploy a particular stack, but the content is YAML and so it throws an error when parsed as JSON. I'm not sure what dictates which the content is, or if there's a way to determine which it is, except to try one and then try the other if that fails.

callback(null, JSON.parse(data.TemplateBody));

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html

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