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

Adding HCL v2 (Terraform v12) language support #51

Merged

Conversation

sponte
Copy link
Contributor

@sponte sponte commented Dec 22, 2020

Resolved #42

Replaced gopher-hcl with new package @evops/hcl-terraform-parser (new package). Includes new test for Terraform v12 (HCL v2) syntax

@outsideris
Copy link
Owner

Thank you for your contribution.
I'm considering how to support and test HCL v2. You provided a new option I didn't know.
I will check your PRs, but it can take some time because it's the end of the years.

Copy link
Owner

@outsideris outsideris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix them on my end.
Thank you a lot.

const json = hcl.parse(content.toString());

return json;
return hcl.parse(content.toString(), filePath);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filePath doesn't needed here.

// attacks
if (f.indexOf(targetPath) !== 0) {
return false;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@outsideris outsideris merged commit e464e85 into outsideris:master Dec 28, 2020
@outsideris outsideris mentioned this pull request Feb 11, 2021
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

Successfully merging this pull request may close these issues.

Support for terraform 0.12
2 participants