# How terraform handles the crash?

**URL:** <https://discuss.hashicorp.com/t/how-terraform-handles-the-crash/40345>\
**Category:** Terraform\
**Created:** [June 3, 2022, 1:48am UTC](https://discuss.hashicorp.com/t/how-terraform-handles-the-crash/40345 "2022-06-03T01:48:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeeshan.khan](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/zeeshan.khan/32/24211_2.png) [@zeeshan.khan](https://discuss.hashicorp.com/u/zeeshan.khan)\
**Post date:** [June 3, 2022, 1:48am UTC](https://discuss.hashicorp.com/t/how-terraform-handles-the-crash/40345/1 "2022-06-03T01:48:25Z")

</div>

Terraform maintains details of all the resources created during “terraform apply”, inside tfstate file. The file needs few time to be updated. But if there happens a breakdown, such that our instance is created in aws but tfstate file is not updated, how can terraform recognize the change and update the tfstate file ?

---

<div class="post-metadata">

**Author:** ![stuart-c](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/stuart-c/32/10789_2.png) [@stuart-c](https://discuss.hashicorp.com/u/stuart-c)\
**Post date:** [June 3, 2022, 7:48am UTC](https://discuss.hashicorp.com/t/how-terraform-handles-the-crash/40345/2 "2022-06-03T07:48:52Z")

</div>

You would manually investigate the issues and then correct the state file accordingly. This could be using `terraform state rm` & `terraform import` for example.
