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

Unmark config values when planning a data source read #28539

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Apr 28, 2021

If the configuration is storing sensitive values in a data source which cannot be read at plan time, those values must be unmarked before creating a planned read value.

This also updates the UpgradeResourceState codepaths to use Diagnostics, and add configuration context when possible.

Fixes #28535

@jbardin jbardin added the 0.15-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Apr 28, 2021
@jbardin jbardin requested a review from a team April 28, 2021 17:51
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #28539 (1db29d7) into main (89f986d) will increase coverage by 0.00%.
The diff coverage is 75.00%.

Impacted Files Coverage Δ
terraform/node_resource_abstract.go 79.61% <54.16%> (-0.12%) ⬇️
terraform/node_resource_abstract_instance.go 73.27% <100.00%> (+0.02%) ⬆️
terraform/node_resource_apply_instance.go 50.47% <100.00%> (ø)
terraform/node_resource_destroy.go 61.36% <100.00%> (ø)
terraform/node_resource_destroy_deposed.go 62.85% <100.00%> (+3.43%) ⬆️
terraform/node_resource_plan_instance.go 73.78% <100.00%> (-0.50%) ⬇️
terraform/node_resource_plan_orphan.go 72.72% <100.00%> (-1.19%) ⬇️
dag/marshal.go 61.90% <0.00%> (-1.59%) ⬇️
terraform/evaluate.go 52.77% <0.00%> (-0.42%) ⬇️

jbardin added 2 commits April 28, 2021 14:09
This path was not yet using diagnostics, and returned simple errors.
@jbardin jbardin force-pushed the jbardin/marked-data-plan branch from f6354a6 to 1db29d7 Compare April 28, 2021 18:09
Copy link
Contributor

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@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 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.15-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: panic: value is marked, so must be unmarked first
2 participants