terraform/internal/command/testdata/show-json
Alisdair McDiarmid f5b90f84a8 jsonconfig: Improve provider configuration output
When rendering configuration as JSON, we have a single map of provider
configurations at the top level, since these are globally applicable.
Each resource has an opaque key into this map which points at the
configuration data for the provider.

This commit fixes two bugs in this implementation:

- Resources in non-root modules had an invalid provider config key,
  which meant that there was never a valid reference to the provider
  config block. These keys were prefixed with the local module name
  instead of the path to the module. This is now corrected.

- Modules with passed provider configs would point to either an empty
  provider config block or one which is not present at all. This has
  been fixed so that these resources point to the provider config block
  from the calling module (or wherever up the module tree it was
  originally defined).

We also add a "full_name" key-value pair to the provider config block,
with the entire fully-qualified provider name including hostname and
namespace.
2022-02-07 15:05:58 -05:00
..
basic-create jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
basic-delete json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
basic-update json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
drift json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
module-depends-on json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
modules jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
moved experiments: config_driven_move has concluded 2021-11-01 08:46:15 -07:00
moved-drift experiments: config_driven_move has concluded 2021-11-01 08:46:15 -07:00
multi-resource-update json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
nested-module-error Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
nested-modules jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
provider-aliasing jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
provider-version jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
provider-version-no-config jsonconfig: Improve provider configuration output 2022-02-07 15:05:58 -05:00
requires-replace json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00
sensitive-values json-output: Release format version 1.0 2021-10-06 11:13:06 -04:00