Open FlorianJDF opened 2 years ago
I am experiencing the same problem
Observed the same behavior.
took me now a full day to end up here, so an annoying 👍 as a comment instead of just a reaction :)
Looks like we're running into a similar issue when indirectly updating the linode_instance_config.device
field in the Linode Terraform Provider: https://github.com/linode/terraform-provider-linode/blob/dev/linode/instanceconfig/resource.go#L115
Also took a full day to debug this, lol May we have a fix in a future version of SDKv2? @bflad @bendbennett
SDK Version
2.7.0
Relevant provider source code
Resource:
State First plan/apply
State after the second plan/apply
The value of the customDiff is persisted, not the Update.
Issue
I am developping a TF provider. I have a resource with a Computed TypeSet.
When calling the Create function at first apply, the TypeSet is created with the rights values. Then the second plan shows the diff from the values in the CustomizeDiff.
But once applied, it is the values of the CustomeDiff that are stored in the state and not the value of the the Update function.
I pasted a representation of the code. In the logs I can see that in the update function the change happened, but is not persisted at the end. Here are the logs of the provider
Expected Behavior
The value stored in the state file shoud be the one set in the function Update.
Am I missing something about how TypeSet works ?
The same behavior is working perfectly with TypeList.