VCS integration between GitLab.com and Terraform Cloud randomly breaks
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Terraform Cloud users that use the GitLab.com VCS integration are reporting that the application they've created to facilitate the connection between the two randomly becomes unauthorized *without* the token being manually revoked, causing the need to generate a new oauth ID to get the connection back up. - [Docs: Terraform - Configuring GitLab.com Access](https://www.terraform.io/docs/cloud/vcs/gitlab-com.html) ### Steps to reproduce **Note: So far, GitLab Support has been unable to reproduce this issue.** 1. Create a project on GitLab.com to act as the source repository for Terraform. 1. Pick a GitLab.com account that has access to this project to act as the account that will house the application that will be provided to Terraform. 1. While logged into that account, follow [the documentation](https://www.terraform.io/docs/cloud/vcs/gitlab-com.html). 1. At random, observe errors on the Terraform side that the token from the previously created application on the GitLab side has been revoked. ### What is the current *bug* behavior? The oauth token created by the GitLab application that is provided to Terraform Cloud that allows it access to the source repository on GitLab is randomly revoked. ### What is the expected *correct* behavior? That the connection between Terraform Cloud and GitLab.com is not interrupted by an invalid token unless that token is manually revoked. ### Relevant logs and/or screenshots From Terraform: ``` 2020-08-20 15:26:27 [ERROR] [5fe163f6-4918-ac65-8e71-b86375b020a2] Server responded with code 401, message: Token was revoked. You have to re-authorize from the user.. Request URI: https://gitlab.com/api/v4/projects ``` ### Output of checks This bug happens on GitLab.com: 13.4.0-pre `3b76ff191e5` ### Zendesk Reports (GitLab Internal) - https://gitlab.zendesk.com/agent/tickets/169714 - https://gitlab.zendesk.com/agent/tickets/170699
issue