Introduction
Site administrators can provision a GitHub App integration that all organizations on the same Terraform Enterprise instance can use to access GitHub repositories. Integrating with a GitHub App offers advantages over connecting to GitHub repositories using GitHub OAuth.
Refer to Terraform Enterprise documentation to learn more.
Problem
When adding a GitHub app VCS integration from Terraform Enterprise UI, you get a Server Error
and in the logs you encounter the following error:
Error 403 - Although you appear to have the correct authorization credentials, the <YOUR_GITHUB_ORGANIZATION_NAME> organization has an IP allow list enabled, and your IP address is not permitted to access this resource. // See: https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-user-access-token
YOUR_GITHUB_ORGANIZATION_NAME
should show your GitHub Enterprise Organization name.
Prerequisites
- Terraform Enterprise VCS from GitHub Enterprise Cloud
Cause
GitHub Enterprise Cloud allows IP allow list per GitHub Enterprise Organization.
Terraform Enterprise instance public IP it's not in the allowed list.
Solution
To resolve the issue:
- add your Terraform Enterprise public IP to the allowed IPs of your GitHub Enterprise Organization.
- wait a few minutes and try to setup the Terraform Enterprise VCS again
Outcome
Terraform Enterprise VCS should be now added.