Introduction
Sometimes Terraform Cloud ,can come across the error mentioned below at starting of the new run, for the same workspace.
Error unlocking workspace: Locked by a run that is not discardable
Use Case
The Terraform Cloud user cannot trigger new runs for specific workspace, because the workspace itself is locked by a previously cancelled run, reported as non-discardable.
Solution
In order fix this issue you need to manually lift the lock by following the steps below:
-
Navigate to the target Terraform Cloud workspace
-
Click on Settings
-
Click on Locking
-
Click on "force unlock" button
Then you should be able to trigger a new run into the target workspace
Additional information
If you are unable to resolve the issue please contact support at tf-cloud@hashicorp.support or submit a ticket via our support portal.