You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can include additional provider code if needed, but the panic stack is entirely in the framework so hopefully the unit test reproduction included below is sufficient.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Module version
Relevant provider source code
I discovered this issue in a resource with this (partial) schema:
I can include additional provider code if needed, but the panic stack is entirely in the framework so hopefully the unit test reproduction included below is sufficient.
Terraform Configuration Files
The resource exists in state and was initially created without the
patches
property. Addingpatches
and planning triggers the crash.Expected Behavior
Terraform executes a plan without crashing, showing
patches
changing from empty/unset to the content above.Actual Behavior
The provider panics:
Steps to Reproduce
Add this test to
StateGetAttributeTest
intfsdk/state_test.go
and run the tests:References
tftypes.Value
with anil
type is passed totypes.Object#ValueFromTerraform
.Other Thoughts
In
types.Object#ValueFromTerraform
, I can fix the failing test by either:in.Type()
is notnil
before callingEqual
IsKnown
andIsNull
checks before the type checkI can submit a PR with the test and a fix, but I'm not sure which option is best, or if there are any other similar cases that need fixes.
The text was updated successfully, but these errors were encountered: