**This product is not officially supported by GitLab. We provide it on a communitysupport bases to allow Terraform users to continue using Terraform with GitLab.**
**This product is not officially supported by GitLab. We provide it on a community-support basis to allow Terraform users to continue using Terraform with GitLab.**
> 🚨 This repository won't upgrade to any new Terraform releases with the BSL license.
> 🚨 This repository won't upgrade to any new Terraform releases with the BSL license.
> Please follow [this issue](https://gitlab.com/gitlab-org/terraform-images/-/issues/114) for updates.
> Please follow [this issue](https://gitlab.com/gitlab-org/terraform-images/-/issues/114) for updates.
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
This repository provides a docker image which contains the `gitlab-terraform` shell script. This script is a thin wrapper around the `terraform` binary. Its main purpose is to support [Infrastructure as code with Terraform and GitLab
This repository provides a docker image which contains the `gitlab-terraform` shell script. This script is a thin wrapper around the `terraform` binary. Its main purpose is to support [Infrastructure as code with Terraform and GitLab
](https://docs.gitlab.com/ee/user/infrastructure/), by extracting some of the standard configuration a user would need to set up to use the Terraform backend on GitLab as well as the Terraform merge request integration.
](https://docs.gitlab.com/ee/user/infrastructure/), by extracting some of the standard configuration a user would need to set up to use the Terraform backend on GitLab as well as the Terraform merge request integration.
## Build and Host Image and Template yourself for up-to-date Terraform
## Build and host the image and template yourself for up-to-date Terraform
Due to the HashiCorp Terraform license change to BSL, GitLab is no longer legally allowed
Due to the HashiCorp Terraform license change to BSL, GitLab is no longer legally allowed
to distribute Terraform as part of its products.
to distribute Terraform as part of its products.
...
@@ -26,10 +26,15 @@ not receive regular updates. The following guide explains how you can host and b
...
@@ -26,10 +26,15 @@ not receive regular updates. The following guide explains how you can host and b
a container image containing an up-to-date Terraform version and the `gitlab-terraform` script and
a container image containing an up-to-date Terraform version and the `gitlab-terraform` script and
deploy it alongside the Terraform CI/CD templates in your own GitLab project.
deploy it alongside the Terraform CI/CD templates in your own GitLab project.
The following steps need to be performed:
To build, host, and deploy with Terraform:
1. Mirror this project using a [Pull Mirror](https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html).
1. Mirror this project using a [pull mirror](https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html).
1. Change the `.terraform-versions` matrix in the `.gitlab-ci.yml` file to the Terraform versions you want to build
(On GitLab self-managed, you cannot fork from GitLab.com.)
You can also:
- Use a fork on GitLab.com to control the updates from this canonical repository.
- Use a fork in combination with the pull mirror, so that the pull mirror on the self-managed instance is always
up-to-date. Use a fork of the pull mirror to control when to roll out the updates.
1. Change the `.terraform-versions` matrix in the `.gitlab-ci.yml` file to the Terraform versions you want to build.
1. Tag the project to trigger a release pipeline. Make sure it succeeds.
1. Tag the project to trigger a release pipeline. Make sure it succeeds.
1. Include the template in a project on your instance:
1. Include the template in a project on your instance: