terraform/command/cliconfig/testdata
Martin Atkins c7fe6b9160 command/cliconfig: handle provider_installation block in JSON syntax
The CLI config can be written in both native HCL and HCL JSON syntaxes, so
the provider_installation block must be expressible using JSON too. Our
previous checks to approximate HCL 2-level strictness were too strict for
HCL JSON where things are more ambiguous even in HCL 2, so this includes
some additional relaxations if we detect that we're decoding an AST
produced from a JSON file.

This is still subject to the quirky ways HCL 1 handles JSON though, so
the JSON value must be structured in a way that doesn't trigger HCL's
heuristics that try to guess what is a block and what is an attribute.
(This is the issue that HCL 2 fixes by always decoding using a schema;
there's more context on this in:
  https://log.martinatkins.me/2019/04/25/hcl-json/ )
2020-04-23 10:52:01 -07:00
..
config
config-env
credentials
hosts
provider-installation command/cliconfig: Use existing HTTP mirror source rather than new stub 2020-04-23 10:52:01 -07:00
provider-installation-errors command/cliconfig: Decode provider_installation blocks 2020-04-21 15:48:07 -07:00
provider-installation.json command/cliconfig: handle provider_installation block in JSON syntax 2020-04-23 10:52:01 -07:00