Problem
The specific error below is encountered when attempting to create a new VCS-driven workspace in Terraform Cloud (TFC), or Terraform Enterprise (TFE)
{
"errors": [
{
"status": "400",
"title": "bad request",
"detail": "Failed to create webhook on repository: Failed to create webhook on repository: ORG/REPO_NAME: 422 Unprocessable Entity"
}
]
}
Cause
- If using GitHub or GitHub Enterprise as the Version Control System (VCS), you may be encountering a limitation of GitHub where they currently only allow the creation of up to 20 webhooks per repository.
Solution:
- Go to https://github.com/ORG_NAME/REPO_NAME/settings/hooks and ensure that there are less than 20 webhooks currently configured for the repository that the workspace attempted to be associated with.
- If you find that there are 20 webhooks, delete at least one of the existing webhooks, if there are any that you can safely delete, then attempt to create the workspace again.
Additional Information
- If you followed the steps above, are still having the issue, and have a paid support plan with HashiCorp Support, please create a support ticket through our portal and mention that you performed the steps within this ticket without a change in the results.
- GitHub documentation pertaining to webhook limitations