Closed rucciva closed 3 years ago
i guess this is related to hashicorp/terraform-plugin-sdk#476
so the problem is that i there is an error in the update function, it fails to update (expected) but then it never updates afterwards. That would be a problem. Resetting the resource data could work. Or I could set the Dirty flag to true, which does the same thing. I'll have to think about it. Thanks for bringing this to my attention
Resetting the resource data could work. Or I could set the Dirty flag to true
I would suggest resetting the resource data, that way the script that depends on old value can work as expected.
P.S: i'm also in the middle of developing custom provider and noticed this behavior. I don't know if this is considered bug in terraform or not. A workaround that i use is to manually reset the *ResourceData using value obtained from GetChange