docs
docs copied to clipboard
Terraform Crash File (errored.tfstate)
what
- Terraform can crash mid-apply. If this happens and your AWS session has expired, it might not be able to write to S3. The are other errors as well that may prevent Terraform from writing the updated state to the configured backend.
- To allow for recovery, the state may be written to the file
errored.tfstatein the current working directory.
remediation
Running "terraform apply" again at this point will create a "forked" state, making it harder to recover.
To retry writing this state, use the following command to push it back to S3:
terraform state push errored.tfstate
I am facing the same. did you get any solution ?. can you help please ?
+1
@osterman do you know if errored.tfstate will be created if terraform is killed? I recently ran into something like this where terraform apply was running in Jenkins and Jenkins had a 60 minute timeout timer, so it terminated terraform uncleanly after 60 minutes and the state was never pushed to S3.