Problem
GitHub App VCS integration fails 8 hours after creation. When attempting to access GitHub App Settings via Admin UI, the user is presented with an Internal Server Error page.
Cause
Terraform Enterprise has a known bug where it sends an invalid request to refresh GitHub App OAuth token causing the VCS connectivity to break.
Overview of Possible Solutions
There are two possible solutions:
1.) Upgrade to Terraform Enterprise 202306-1 (713) or later where a bug fix is in place.
2.) Remain on same Terraform Enterprise version and disable token expiration.
Solution #1
1. Upgrade to Terraform Enterprise 202306-1 (713) or later.
2. Go to GitHub App Settings page, then click the Revoke all user tokens button.
3. Go to TFE Admin Settings > VCS Integrations page, then click Authorize button and follow the prompts to reauthorize the GitHub App.
Solution #2
1. Go to GitHub App Settings page, then click the Revoke all user tokens button.
2. Go to the GitHub App Settings > Optional Features page, then click the Opt-out button for User-to-server token expiration.
3. Go to TFE Admin Settings > VCS Integrations page, then click Authorize button and follow the prompts to reauthorize the GitHub App.
Outcome
After following these steps, VCS connectivity functionality will be restored.
Additional Information
For additional assistance, please contact HashiCorp Support.