packer-cn/vendor
Adrien Delorme 5ba134ac5b
JSON to HCL2 (minimal best-effort) transpiler (#9659)
hcl2_upgrade transforms a JSON build-file in a HCL2 build-file.
This starts a validated Packer core and from that core we generate an HCL 'block' per plugin/configuration. So for a builder, a provisioner, a post-processor or a variable. The contents of each block is just transformed as is and basically all fields are HCL2-ified.
A generated field can be valid in JSON but invalid on HCL2; for example JSON templating (in mapstructure) allows to set arrays of strings - like `x = ["a", "b"]` - with single strings - like `x="a"` -, HCL does not allow this.
Since JSON does not make the distinction between variables and locals, everything will be a variable. So variables that use other variables will not work.
hcl2_upgrade tries to transform go templating interpolation calls to HCL2 calls when possible, leaving the go templating calls like they are in case it cannot.

Work:
* transpiler
* tests
* update hcl v2 library so that output looks great.
* update docs
2020-08-25 10:51:43 +02:00
..
cloud.google.com/go Drop the iso_checksum_type & iso_checksum_url fields (#8437) 2020-05-28 11:02:09 +02:00
github.com JSON to HCL2 (minimal best-effort) transpiler (#9659) 2020-08-25 10:51:43 +02:00
go.opencensus.io Standardize compute SDK version 2020-04-07 22:49:24 +00:00
golang.org/x Update Yandex.Cloud go packages "go-genproto" and "go-sdk" 2020-06-17 12:35:43 +03:00
google.golang.org builder/googlecompute: add support for oslogin (#9339) 2020-07-08 06:30:25 -04:00
gopkg.in Update Yandex.Cloud go packages "go-genproto" and "go-sdk" 2020-06-17 12:35:43 +03:00
honnef.co/go/tools Drop the iso_checksum_type & iso_checksum_url fields (#8437) 2020-05-28 11:02:09 +02:00
modules.txt JSON to HCL2 (minimal best-effort) transpiler (#9659) 2020-08-25 10:51:43 +02:00