Problem
Pull requests in Azure DevOps Services are blocked by checks waiting on status updates from runs in HCP Terraform or Terraform Enterprise workspaces that have been deleted.
Cause
This issue occurs because of branch policies on the Azure DevOps Services repository. These policies can require status checks, such as speculative plans in HCP Terraform or Terraform Enterprise, to pass before a pull request can be merged.
While the workspace referenced in the status check may no longer exist, the repository branch may still be configured to require a passing update from it as a part of its branch policies.
Solution
To resolve this, you must remove the outdated status check from the branch policy in Azure DevOps Services.
- Navigate to your project in Azure DevOps Services.
- Go to Repos > Branches and find the target branch of the pull request.
- Select More options (...) > Branch policies.
- Under the Status Checks section, find the rule that references the deleted HCP Terraform or Terraform Enterprise workspace and remove it.
Additional Information
- For more details on managing branch policies, refer to the official Microsoft documentation on Branch policies and settings (Azure DevOps Services).