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

Backport of recent JSON output changes #28982

Merged

Conversation

teamterraform
Copy link
Contributor

@teamterraform teamterraform commented Jun 18, 2021

Backport

Backport to v1.0 of three recent PRs which affect the JSON plan output format:

@teamterraform teamterraform force-pushed the backport/alisdair/jsonplan-drift/unlikely-hopeful-falcon branch from 79dcae8 to 0a3968d Compare June 18, 2021 15:38
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 18, 2021

CLA assistant check
All committers have signed the CLA.

mildwonkey and others added 3 commits June 18, 2021 11:45
…ions (#28889)

* jsonplan and jsonstate: include sensitive_values in state representations

A sensitive_values field has been added to the resource in state and planned values which is a map of all sensitive attributes with the values set to true.

It wasn't entirely clear to me if the values in state would suffice, or if we also need to consult the schema - I believe that this is sufficient for state files written since v0.15, and if that's incorrect or insufficient, I'll add in the provider schema check as well.

I also updated the documentation, and, since we've considered this before, bumped the FormatVersions for both jsonstate and jsonplan.
The "references" included in the expression representation now properly unwrap for each traversal step, to match what was documented.
Previously, if any resources were found to have drifted, the JSON plan
output would include a drift entry for every resource in state. This
commit aligns the JSON plan output with the CLI UI, and only includes
those resources where the old value does not equal the new value---i.e.
drift has been detected.

Also fixes a bug where the "address" field was missing from the drift
output, and adds some test coverage.
@alisdair alisdair force-pushed the backport/alisdair/jsonplan-drift/unlikely-hopeful-falcon branch from 446d98f to ef7a4e3 Compare June 18, 2021 15:45
@alisdair alisdair changed the title Backport of json-output: Omit unchanged resource_drift entries into v1.0 Backport of recent JSON output changes Jun 18, 2021
@alisdair alisdair self-assigned this Jun 18, 2021
@alisdair alisdair requested a review from mildwonkey June 18, 2021 15:48
@alisdair alisdair merged commit d998ab3 into v1.0 Jun 18, 2021
@alisdair alisdair deleted the backport/alisdair/jsonplan-drift/unlikely-hopeful-falcon branch June 18, 2021 16:04
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants