# Managed disk changes after failback from failover causes Terraform to destroy and recreate disk

**URL:** <https://discuss.hashicorp.com/t/managed-disk-changes-after-failback-from-failover-causes-terraform-to-destroy-and-recreate-disk/34068>\
**Category:** Terraform Providers\
**Tags:** azure\
**Created:** [January 10, 2022, 9:40pm UTC](https://discuss.hashicorp.com/t/managed-disk-changes-after-failback-from-failover-causes-terraform-to-destroy-and-recreate-disk/34068 "2022-01-10T21:40:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wlayton](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/wlayton/32/25016_2.png) [@wlayton](https://discuss.hashicorp.com/u/wlayton)\
**Post date:** [January 10, 2022, 9:40pm UTC](https://discuss.hashicorp.com/t/managed-disk-changes-after-failback-from-failover-causes-terraform-to-destroy-and-recreate-disk/34068/1 "2022-01-10T21:40:20Z")

</div>

We set up an Azure VM with attached managed data disk and configured for site recovery to a secondary region. The full build was done with Terraform. We did a full DR test and failed the VM over to a secondary region and failed it back.

Now Terraform detects changes to the data disk and wants to destroy and recreate it along with the site recovery settings. This is due to the create\_option and source\_resource\_id changing from the failover.

How do we account for changes after failover with Terraform?

---

<div class="post-metadata">

**Author:** ![vivek20gupta](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/vivek20gupta/32/44123_2.png) [@vivek20gupta](https://discuss.hashicorp.com/u/vivek20gupta)\
**Post date:** [March 17, 2025, 10:52pm UTC](https://discuss.hashicorp.com/t/managed-disk-changes-after-failback-from-failover-causes-terraform-to-destroy-and-recreate-disk/34068/2 "2025-03-17T22:52:10Z")

</div>

Hi - I am running with same problem. Did you get any fix for this
