The current version of Terraform Enterprise (TFE) does not provide a feature to revert state within the application. However, you can use Terraform on the command line to push any state you would like into a workspace to become the current state.
- To obtain the desired state, navigate to the workspace’s States list, select the desired state, and click “Download raw” to download the raw state file to your local machine.
- Configure Terraform locally with a TFE backend and run
terraform initas described in that article. Note: the Terraform CLI being used to upload the new state needs to match the same version configured on the workspace in Terraform Enterprise.
terraform state push /path/to/statefile.json.
Note that this is
terraform state push and not
terraform push is deprecated and does not operate in the current version of TFE.