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 cli: Fix plan diff for sensitive nested attributes into v1.1 #30829

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #30825 to be assessed for backporting due to the inclusion of the label 1.1-backport.

The below text is copied from the body of the original PR.


When rendering diffs for resources which use nested attribute types, we must cope with collections backing those attributes which are entirely sensitive. The most common way this will be seen is through sensitive values being present in sets, which will result in the entire set being marked sensitive.

This approach fixes the crash by entirely omitting sensitive collections from the diff output. For some situations this is reasonable—for example, a list(string) which is populated by a sensitive variable should be elided from user view. In other use cases, notably set-backed nested attributes, this is likely to be counter-intuitive. Unfortunately, given how cty copes with marks on sets, I don't see any alternative at this time.

Fixes #30824.

@teamterraform teamterraform force-pushed the backport/alisdair/fix-nested-attr-sensitive-collections/severely-still-ladybug branch from d45ff68 to faf5923 Compare April 11, 2022 12:05
@alisdair alisdair merged commit 584ca23 into v1.1 Apr 11, 2022
@alisdair alisdair deleted the backport/alisdair/fix-nested-attr-sensitive-collections/severely-still-ladybug branch April 11, 2022 12:26
@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 May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants