Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform Crash File (errored.tfstate) #358

Open
osterman opened this issue Jan 11, 2019 · 3 comments
Open

Terraform Crash File (errored.tfstate) #358

osterman opened this issue Jan 11, 2019 · 3 comments

Comments

@osterman
Copy link
Member

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.tfstate in 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
@muthukumars
Copy link

I am facing the same. did you get any solution ?. can you help please ?

@guru-cool
Copy link

+1

@RothAndrew
Copy link
Sponsor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants