GitLab Integration



In order to integrate with GitLab, you need to have a GitLab user with Maintainer/Owner permissions on the necessary GitLab Project. We highly recommend that the user would be a designated shared bot user, as env0 would perform actions as this user on the project/repository.

If you do not have those permissions, please ask an admin or a different user with those permissions to create the template.

New Template

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

  1. Click ADD A NEW TEMPLATE on the top right in the Templates screen.
  2. Pick your template type, enter a name for the template, and then click on NEXT
  3. Click on the button. Since you have already created a GitLab template in this env0 organization, there is no need for further authentication with Gitlab.
  4. Pick which user you want to authenticate as, out of the users in your organization that have already authorised the env0 GitLab app. After picking the user, you'll be able to pick a project from the GitLab Projects accessible to that user.
  5. 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".
  6. 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.
  7. Click on NEXT to proceed to the variables section
  8. Add environment and terraform variables that you'd like to be used during deployment, and then click on NEXT to go to the final "Projects" section
  9. Pick the projects that you'd like to have access to deploy this template, and then click on DONE to create the template.



  • Can't find your repository? Check if your Authorized User has access to the necessary GitLab project. In order to authorize as a new GitLab user, please log out of GitLab on your browser, and then click on "authorize another GitLab user"

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 button, and integrate with GitLab as you would for a new template.


Additional Content