Closed vynaloze closed 5 years ago
Okay, this is caused because I use new hcl2 instead of hcl. Should've checked it before.
@vynaloze did you find a solution?
I too would like to use hclencoder with terraform 0.12 but am running into this exact issue.
I use official hcl write package: https://godoc.org/github.com/hashicorp/hcl2/hclwrite
It's pretty low-level and the documentation is not great - but it gets work done.
Hi! I think there may be a bug while encoding maps:
should be encoded as
and currently is encoded as block:
Due to that, while parsing this code, official hclparse fails:
Try it yourself: https://play.golang.org/p/4xShKnfAXa1
I've added a failing test which covers this functionality on my fork, I didn't look into implementation yet.
What do you think about this issue?