For using repositories from Gitlab.com with Terrakube workspaces and modules you will need to follow these steps:
Manage VCS Providers permission is required to perform this action, please check Team Management for more info.
Navigate to the desired organization and click the Settings button, then on the left menu select VCS Providers
If you prefer, you can add a new VCS Provider directly from the Create workspace or Create Module screen.
Click the Gitlab button
In the next screen click the link to register a new OAuth Application in Gitlab
On Gitlab, complete the required fields and click Save application button
Field | Description |
---|---|
Name | Your application name, for example you can use your organization name. |
Redirect URI | Copy the Redirect URI from the UI |
Scopes | Only api should be checked |
You can complete the fields using the information suggested by terrakube in the VCS provider screen
In the next screen, copy the Application ID and Secret
Go back to Terrakube to enter the information you copied from the previous step. Then, click the Connect and Continue button.
You will see a Gitlab window, click the Authorize button to complete the connection
Finally, if the connection was established successfully, you will be redirected to the VCS provider’s page in your organization. You should see the connection status with the date and the user that created the connection.
And now, you will be able to use the connection in your workspaces and modules: