terraform/command/jsonconfig
Alisdair McDiarmid 7cae76383a cli: Fix for provider requirements in JSON plan
The JSON plan output format includes a serialized, simplified version of
the configuration. One component of this config is a map of provider
configurations, which includes version constraints.

Until now, only version constraints specified in the provider config
blocks were exposed in the JSON plan output. This is a deprecated method
of specifying provider versions, and the recommended use of a
required_providers block resulted in the version constraints being
omitted.

This commit fixes this with two changes:

- When processing the provider configurations from a module, output the
  fully-merged version constraints for the entire module, instead of any
  constraints set in the provider configuration block itself;
- After all provider configurations are processed, iterate over the
  required_providers entries to ensure that any configuration-less
  providers are output to the JSON plan too.

No changes are necessary to the structure of the JSON plan output, so
this is effectively a semantic level bug fix.
2021-02-05 14:01:58 -05:00
..
config.go cli: Fix for provider requirements in JSON plan 2021-02-05 14:01:58 -05:00
doc.go json output of terraform plan (#19687) 2018-12-19 11:08:25 -08:00
expression.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
expression_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00