Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfn.getTemplate may return YAML instead of JSON #196

Open
rreusser opened this issue Dec 6, 2022 · 1 comment
Open

cfn.getTemplate may return YAML instead of JSON #196

rreusser opened this issue Dec 6, 2022 · 1 comment

Comments

@rreusser
Copy link

rreusser commented Dec 6, 2022

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

@rreusser rreusser changed the title cfn.getTemplate returns YAML instead of JSON cfn.getTemplate may return YAML instead of JSON Dec 6, 2022
@rreusser
Copy link
Author

rreusser commented Dec 6, 2022

Oh, this is addressed by #184. Perhaps the real issue is that even though YAML should correctly be forbidden, somehow YAML made its way into a template in the first place and now cannot directly be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant