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 core: Fix double-marked sensitive attributes into v0.15 #28383

Conversation

teamterraform
Copy link
Contributor

Backport

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

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


If a resource has a writeable attribute which is sensitive in the schema, which is bound to a marked sensitive value, reading the resource from state would previously crash due to double-marking the value. To fix this, we need to unmark the value from state, merge its marks with the schema-derived marks, and re-apply the merged marks.

Fixes #28370.

@teamterraform teamterraform requested a review from alisdair April 15, 2021 14:13
@teamterraform teamterraform force-pushed the backport/alisdair/fix-double-mark-sensitive-attrs/mostly-unbiased-ox branch from fb76222 to acc5c44 Compare April 15, 2021 14:13
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #28383 (acc5c44) into v0.15 (fe2966a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
terraform/evaluate.go 53.18% <100.00%> (+0.60%) ⬆️
checkpoint.go 2.63% <0.00%> (-28.95%) ⬇️
terraform/node_resource_plan.go 98.05% <0.00%> (+1.94%) ⬆️
internal/providercache/dir.go 73.46% <0.00%> (+6.12%) ⬆️

@alisdair alisdair merged commit 2fc176a into v0.15 Apr 15, 2021
@alisdair alisdair deleted the backport/alisdair/fix-double-mark-sensitive-attrs/mostly-unbiased-ox branch April 15, 2021 14:19
@github-actions
Copy link
Contributor

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 16, 2021
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.

2 participants