Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.envzero.com/llms.txt

Use this file to discover all available pages before exploring further.

To integrate with GitLab, you need a GitLab user with Maintainer/Owner permissions on the necessary GitLab Project. We recommend using a designated shared bot user, as env zero performs actions as this user on the project/repository.If you do not have those permissions, ask an admin or a different user with those permissions to create the template.

Prerequisites

Before creating a GitLab template, you need a GitLab VCS connection configured in your organization. To set one up, go to Organization Settings > VCS and create a new GitLab connection. Learn more: Managing VCS Connections

New Template

If you would like to create the first GitLab Integrated Template in this env zero organization, please see Create Your First Template instead.
1

Create Template

Click ADD A NEW TEMPLATE on the top right in the Templates screen. Pick your template type, enter a name for the template, and then click NEXT.
2

Select GitLab

Click on the GitLab.com button.
3

Select VCS Connection

Select a pre-configured GitLab VCS connection from the dropdown. If no connection exists, click Add VCS Connection to create one.
4

Select Repository

Pick the repository containing your IaC configuration from the list of accessible GitLab projects.
5

Configure Source

If you would like to pull the code from a specific revision or branch, enter that in the Revision field. Leaving this field empty will use your default branch, which is usually “master”/“main”.Enter the folder your Terraform files are located in under Terraform Folder. If your Terraform files are in the root of the repository, leave this empty.
6

Configure Variables

Click NEXT to proceed to the variables section. Add environment and Terraform variables that you’d like to be used during deployment, and then click NEXT to go to the final “Projects” section.
7

Assign Projects

Pick the projects that you’d like to have access to deploy this template, and then click DONE to create the template.
Troubleshoot
  • Can’t find your repository? Verify that the VCS connection has access to the necessary GitLab project. You can check the available repositories in Organization Settings > VCS by selecting the relevant connection.

Existing Template

If you would like to integrate an existing template with GitLab:
  1. Go to the Templates screen, and click on Settings for the template you would like to integrate with GitLab.
  2. Click on the VCS step. From there you can click on the GitLab.com button, and integrate with GitLab as you would for a new template.

Next steps