cfn.getTemplate may return YAML instead of JSON
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 53
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
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.
See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/lookup.js line 126 and inspect how cfn.getTemplate output is parsed. Read the linked AWS CloudFormation template documentation to determine the possible template formats. Done means templates returned as YAML as well as JSON no longer trigger the reported JSON parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100