[Question] state when update lifecycle failed

Hi all, i noticed that when update lifecycle fail (via returning error in UpdateContext), the state was actually updated and on the subsequent apply, (*schema.ResourceData).HasChange() will return false.

To keep the old state, i need to manually invoke (*schema.ResourceData).Set() with old state that can be obtained from (*schema.ResourceData).GetChange() when update fail.

is this expected?

This is a known issue. We are trying to track down when the issue was introduced so we can determine whether fixing it in place is possible or if we need to offer an explicit opt-in to the fix.

I see. Thanks for the information @paddy, i’ve subscribed to the issue.