jkcfg / jk

Configuration as Code with ECMAScript

Home Page:https://jkcfg.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support reading and writing HCL files

dlespiau opened this issue · comments

The HashiCorp Configuration Language (HCL) has a JSON transform, we should be able to use it to output (and also also read from!) .tf or .hcl files.

Terraform 0.12 is reaffirming its commitment to the JSON output:

https://www.hashicorp.com/blog/terraform-0-12-reliable-json-syntax
https://www.terraform.io/docs/internals/json-format.html

There are quite a few details needed to keep a 1:1 (terraform) HCL <-> JSON representation, hopefully we'll get tooling to help us provide better HCL support in the future.

https://github.com/hashicorp/hcl/wiki/Version-Selection I think if we switch to v2 of the hcl library we might get even closer