Problem
When creating a new workspace in the HCP Terraform UI, a user is able to trigger runs from the UI successfully, however when creating a PR in Github it does not include the HCP Terraform speculative run link back to this workspace. The webhook has all the necessary admin permissions for the workspace.
Cause
- As part of creating a new workspace by default the Automatic speculative plans flag located at https://app.terraform.io/app/$Organization-name/workspaces/$workspace-name/settings/version-controlby under the Speculative section is disabled.
- To allow speculative plans, the Automatic speculative plans flag would need to be enabled by placing a checkmark in the field and saving the workspace
- Once enabled, the speculative plan link to HCP Terraform will be included in the Github PR
Solutions:
- 
Go to https://app.terraform.io/app/$Organization-name/workspaces/$workspace-name/settings/version-controlby and enable the Automatic speculative plans flag under the Speculative section and save the workspace. 
- 
Now the speculative link will exists In the Github PR under the Conversation tab and about midway down the page should contain an All checks have passedsection for the PR. The right of that block should display theshow all checkshypertext link. Click on it and that will uncover theDetailssection which includes the aforementioned speculative plan link
Additional Information
- For additional assistance please contact HashiCorp Support