-
Notifications
You must be signed in to change notification settings - Fork 93
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
Amend Plan Resource Change To Allow For Optional Blocks #552
Conversation
…ional blocks to be present within configuration (#551)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the one test fix and missing changelog, looks good to me 🚀
}, | ||
PriorState: &tfsdk.State{ | ||
Raw: tftypes.NewValue(testSchemaBlockType, map[string]tftypes.Value{ | ||
"test_required": tftypes.NewValue(tftypes.String, "test-new-value"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To trigger this new unit test to fail without the fix and therefore verify the fix, there needs to be a difference between the prior state and proposed new state to trigger the call to MarkComputedNilsAsUnknown
. Adjusting this line should do the trick.
"test_required": tftypes.NewValue(tftypes.String, "test-new-value"), | |
"test_required": tftypes.NewValue(tftypes.String, "test-value"), |
The reason this issue occurs upstream is mainly because during resource creation, the prior state is null, but the proposed new state contains blocks.
additional test coverage for the MarkComputedNilsAsUnknown changes added in #552
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. |
Closes: #551
Closes: hashicorp/terraform-plugin-framework-timeouts#14