Introduction
Problem
When a user who originally configured the Terraform Cloud (TFC) integration with GitHub or GitLab leaves their organization, the integration may break or become unauthorized. This can lead to issues such as failed runs, inability to access repositories, or errors in workspace configurations.
Cause
The integration between Terraform Cloud and the version control system (VCS) is tied to the credentials of the user who initially authorized the connection. If that user leaves the organization or their account is deactivated, Terraform Cloud loses access to the VCS, resulting in authentication failures or broken links between workspaces and repositories.
Solutions:
To resolve this issue, follow these steps to reauthorize the VCS provider with a valid user account:
- Navigate to: Terraform Cloud VCS Settings
- Select the appropriate VCS provider (GitHub/GitLab/ADO).
- Click on "Reauthorize".
- Enter the credentials of a new user (username and password) who has access to the repositories.
- Click on "Skip and Finish" to complete the reauthorization process.
Outcome
Once reauthorization is complete:
- Terraform Cloud will regain access to the repositories.
- Workspace configurations will function as expected.
- Future runs will proceed without authentication errors.
- The integration will now be tied to the new user, ensuring continuity.