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 ?
You would manually investigate the issues and then correct the state file accordingly. This could be using
terraform state rm &
terraform import for example.