Problem
Conducting a Pull Request (PR) in GitHub shows the process is waiting on a successful check for a Terraform workspace that no longer exists. The Terraform Cloud (TFC) or Terraform Enterprise (TFE) workspace has been deleted but is still referenced in the GitHub PR process.
Cause
- The Branch Rule protection option is enabled in Github and the corresponding repository is listed as a required status check.
-
The requirement including the Terraform Cloud path is coming from the GitHub side. This means the repo may have the Branch Rule protection option enabled. That's illustrated by the Required notion at the end of the "Expected --- Waiting for" line, see below.
- This will give the appearance that the requirement or status check is coming from TFC or TFE, even though the workspace in TFC has been deleted.
Solutions:
Access the Branch Rules option and validate if there is a Requirement status checks to pass before merging selected and the Status checks that are required field contains the repo in question similar to this example repo Terraform Cloud/xxxx/xxxx in the referring snippet below.
If the Branch Rule contains the repo removing the entry listed in the Status checks that are required should prevent it from getting PR checks, which would cease to cause the PR checks from completing.
Additional Information
- For additional assistance please contact HashiCorp Support.