packer-cn/vendor/github.com/hashicorp
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
..
consul/api update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
errwrap go mod vendor && go mod tidy 2019-04-11 14:19:24 +02:00
go-checkpoint Revert "vendor vendors" 2019-10-28 14:31:07 -07:00
go-cleanhttp update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-cty-funcs get github.com/hashicorp/go-cty-funcs@0d04eb807361 2020-05-20 15:51:34 +02:00
go-getter Update go-getter and add samba shared files tests to step_download (#8954) 2020-06-04 15:00:18 +02:00
go-hclog update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-immutable-radix update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-multierror update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-oracle-terraform Use the hashicorp/go-getter to download files 2019-03-13 12:11:58 +01:00
go-retryablehttp update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-rootcerts update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-safetemp Use the hashicorp/go-getter to download files 2019-03-13 12:11:58 +01:00
go-sockaddr update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
go-uuid Hcl2 input variables, local variables and functions (#8588) 2020-02-06 11:49:21 +01:00
go-version vendor: github.com/hashicorp/go-version@v1.2.0 2019-05-06 22:28:27 +01:00
golang-lru builder/hyperone: fix & add tests for tags 2019-12-03 14:57:40 +01:00
hcl JSON to HCL2 (minimal best-effort) transpiler (#9659) 2020-08-25 10:51:43 +02:00
serf Add consul template function 2018-08-28 11:04:33 -07:00
vault update consul and vault dependencies (#9205) 2020-05-11 15:26:01 -04:00
yamux go mod vendor && go mod tidy 2019-04-11 14:19:24 +02:00