terraform/command/testdata/show-json
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
..
basic-create Revert "fix show -json tests" 2020-09-21 16:17:45 -04:00
basic-delete Revert "fix show -json tests" 2020-09-21 16:17:45 -04:00
basic-update update new outputs plan json 2020-10-12 17:29:45 -04:00
module-depends-on Ensure depends_on is in module calls for config 2020-08-20 07:49:03 +10:00
modules Revert "fix show -json tests" 2020-09-21 16:17:45 -04:00
multi-resource-update update new outputs plan json 2020-10-12 17:29:45 -04:00
nested-module-error fix show-json test to expect error from nested mod 2019-07-16 21:30:04 -04:00
nested-modules Mildwonkey/command tests (#24535) 2020-04-06 09:24:23 -07:00
provider-version cli: Fix for provider requirements in JSON plan 2021-02-05 14:01:58 -05:00
provider-version-no-config cli: Fix for provider requirements in JSON plan 2021-02-05 14:01:58 -05:00