Skip to content

Instantly share code, notes, and snippets.

@jonathanhle
Created July 31, 2020 06:51
Show Gist options
  • Save jonathanhle/405ad5471c16d3819cd140432e490533 to your computer and use it in GitHub Desktop.
Save jonathanhle/405ad5471c16d3819cd140432e490533 to your computer and use it in GitHub Desktop.
Manual Terraform State Editing
From: https://github.com/hashicorp/terraform/issues/21499
Hi @im-dofoborh!
Manual changes can be made using the following workflow:
* terraform state pull >temp.tfstate
* edit temp.tfstate carefully as needed
* increment the integer in the top-level serial property so Terraform Cloud can see that the change was intentional
* terraform state push temp.tfstate
Please note that we use GitHub issues for tracking bugs and enhancements rather than for questions. While we may be able to help with certain simple problems here it's generally better to use one of the community forums where there are far more people ready to help, whereas the GitHub issues here are generally monitored only by our few core maintainers. If you are a Terraform Enterprise customer then you can also reach out to the Terraform Enterprise customer support team.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment