Problem
When you create a pull request (PR) in GitHub, the status check waits for a plan from an HCP Terraform or Terraform Enterprise workspace that has been deleted. The PR is blocked because the required check from the non-existent workspace never completes.
Cause
This issue occurs when a GitHub repository has branch protection rules that require a status check to pass before merging. If a deleted HCP Terraform or Terraform Enterprise workspace is still listed as a required check in these rules, GitHub continues to wait for its status, even though the workspace no longer exists.
The Required label on the status check indicates that this is a GitHub-side configuration, not a requirement from HCP Terraform or TFE.
Solution
To resolve this, you must remove the stale status check from the branch protection rules in your GitHub repository settings.
Procedure
- In GitHub, navigate to the Settings tab of the affected repository.
- Select Branches from the side menu to access the branch protection rules.
- Locate the rule for the branch you are merging into and select Edit.
- Find the setting Require status checks to pass before merging.
-
In the list of required status checks, find and remove the entry corresponding to the deleted workspace (e.g.,
Terraform Cloud/your-org/deleted-workspace-name). - Scroll to the bottom and click Save changes.
Outcome
After you remove the stale entry, GitHub will no longer require a status check from the deleted workspace, allowing your pull requests to proceed.
Additional Information
For more details on integrating version control systems with HCP Terraform, refer to the official documentation on VCS connections.