Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonconfig: Improve provider configuration output #30138

Merged
merged 3 commits into from Feb 10, 2022

Commits on Feb 7, 2022

  1. 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.
    alisdair committed Feb 7, 2022
    Copy the full SHA
    f5b90f8 View commit details
    Browse the repository at this point in the history
  2. json: Disregard format version in tests

    Instead of manually updating every JSON output test fixture when we
    change the format version, disregard any differences when testing.
    alisdair committed Feb 7, 2022
    Copy the full SHA
    ddc81a2 View commit details
    Browse the repository at this point in the history
  3. json: Increment JSON plan format version

    The JSON plan configuration data now includes a `full_name` field for
    providers. This addition warrants a backwards compatible increment to
    the version number.
    alisdair committed Feb 7, 2022
    Copy the full SHA
    fe8183c View commit details
    Browse the repository at this point in the history