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

Fix terraform example to at least work with 0.11 terraform #313

Merged
merged 2 commits into from
Jan 5, 2020

Conversation

drubin
Copy link
Contributor

@drubin drubin commented Jan 4, 2020

This references the bigger issue #312 and only makes it work with 0.11 terraform. I think we need to fix the upstream lib to get it to work with 0.12 considering they are dropping support for 0.11 I think it makes sense for this library to only support 0.12 going forward.

References #312

@drubin drubin force-pushed the fix-terraform-example branch from a378913 to 83c0657 Compare January 4, 2020 14:30
Copy link
Member

@dlespiau dlespiau left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Lgtm.

Also agree it makes sense to focus on 0.12+

@dlespiau dlespiau merged commit 5665717 into jkcfg:master Jan 5, 2020
@drubin
Copy link
Contributor Author

drubin commented Jan 5, 2020

I suggest merge and squashing if yo u can I only just fixed the eslint warnings to my phone so the commits aren't great yet.

Edit: you were too quick

@dlespiau
Copy link
Member

dlespiau commented Jan 5, 2020

I’m not sure what’s upstream plan with the Hcl library but it seems likely they’ll accept changes to make the hcl serialisation compatible with 0.12

@drubin
Copy link
Contributor Author

drubin commented Jan 5, 2020

I tried to also fix the help text to highlight this only works with Terraform 0.11 but honestly I couldn't figure out how the docs are autogenerated from these. .cmd files (which is the coolest thing I have seen in a long time. Unit testing your example docs ++)

@drubin
Copy link
Contributor Author

drubin commented Jan 5, 2020

@dlespiau seems like we should just switch to the v2 branch https://github.com/hashicorp/hcl/wiki/Version-Selection

@dlespiau
Copy link
Member

dlespiau commented Jan 5, 2020

Oh, yes, indeed! Seems like we should bump our usage of the Hcl library to v2 and see what happens.

@drubin drubin deleted the fix-terraform-example branch January 5, 2020 16:11
@squaremo
Copy link
Member

we should bump our usage of the Hcl library to v2 and see what happens

I gave this a try. The v2 codebase is organised quite differently; I was able to find the package for parsing a JSON input (github.com/hashicorp/hcl/v2/hclparse), but there doesn't seem to be any general-purpose way to serialise the result into HCL. The most obvious candidate, .../hclwrite, seems to support only serialising values constructed in its own, disjoint set of types.

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.

3 participants