Closed princespaghetti closed 4 years ago
Can create a different issue if needed, but also noticed the repo referenced by the parser code for HCL2 has a disclaimer to point back to the main HCL repository: https://github.com/hashicorp/hcl2/#experimental-hcl2
Hi @barbia,
Normally tf
extension strictly bound to classic hcl
.
To use hcl2
, pass --input
flag to the test
command like:
conftest test --input hcl2 terraform.tf
Thanks @boranx! Any thoughts on my second note, it sounds like the two libraries will be unifying at some point: https://github.com/hashicorp/hcl/wiki/Version-Selection
Hey @boranx, @barbia,
I'd be happy to work on migrating our current parser to the stable version if that's something of interest to the project.
Thanks.
I have raised a PR that should address this.
@menendezjaume Thanks for providing a PR. I will close this issue.
when running the below command in the hcl2 example directory the following error is produced
conftest test terraform.tf
ERRO[0000] Unable to BulkUnmarshal your config files: Should not have any errors on unmarshalling: At 16:16: Unknown token: 16:16 IDENT data.consul_key_prefix.environment.var
This seems to be an error parsing the terraform.tf file and how the parser handles the dynamic block.
Version in use: 0.15.0