🦊Connect to Gitlab

Source Code Management (SCM) Integration

Let’s get started with integrating Gitlab with Resourcely. This step entails:

  • Authenticate Resourcely with GitLab

  • Integrating Resourcely with Gitlab using a Group Access Token

  • Configuring a Webhook for Resourcely

  • Choosing a Repository for Resourcely to Monitor

Authenticate Resourcely with Gitlab

Now let's connect Resourcely to Gitlab to enable automatic runs on git commits, automatic runs on merge-requests, and status updates. Press the Connect to Gitlab button to proceed.

For Resourcely to modify Gitlab settings, you must first grant the appropriate level of authorization on your behalf. Press the Authorize with Gitlab button to proceed.

You will then be taken to your Gitlab user settings and asked to Authorize Resourcely to use your account. Press the Authorize button to proceed.

Go back to the Resourcely window and proceed with onboarding.

Integrating Resourcely with Gitlab using a Group Access Token

To grant access to all projects within the Gitlab group a group access token is required. Enter the Group Access Token created as seen in the GitLab prerequisites section. Then press the Continue button to proceed.

The group access token is used by Resourcely to verify the GitLab integration such as verifying the webhook

Configuring a GitLab Webhook for Resourcely

GitLab Webhooks deliver notifications to an external web server whenever a defined event occurs on GitLab. To proceed to configure a GitLab webhook, click on the GitLab webhook Settings link and copy over the Webhook URL and Webhook secret token provided in the following dialogue:

You must then configure the webhook with the following settings:

  • Trigger: Merge request events

All other webhook settings can remain unchanged.

Once the webhook has been properly set up, scroll down to the bottom of the page and press the Add webhook button. You can now see that the webhook was added successfully.

Navigate back to the Resourcely window and press the Continue button to proceed.

Choosing a Repository for Resourcely to Monitor

You must now choose the repository that hosts your Terraform code. This is the repository in which Resourcely will watch for commits and merge-requests.

Press the Add a repository button and select a repository from the dropdown.

You can add more repositories to monitor by pressing the Add repository button.

To begin onboarding, only one repository is needed. However, you have the flexibility to add more later.

Press the Publish button to continue. You should now see that GitLab has been successfully integrated with Resourcely.

Now that Resoucely has been fully integrated into GitLab, we must add the Resourcely CI/CD Job to our project for Resourcely to validate our infrastructure resources. Proceed to Generate API Token

Last updated