diff --git a/README.md b/README.md index d454e257946fe3dbbe5a4dbd1b611b4789aeb259..b3f2423656e3d6f95029923bf94ad24079dbdf35 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ # Terraform Images -This repository won't upgrade to any new Terraform releases with the BSL license for now. -Please follow [this issue](https://gitlab.com/gitlab-org/terraform-images/-/issues/114) for updates. +> 🚨 This repository won't upgrade to any new Terraform releases with the BSL license for now. +> Please follow [this issue](https://gitlab.com/gitlab-org/terraform-images/-/issues/114) for updates. +> +> We'd like to advise you to use the new [**OpenTofu CI/CD component**](https://gitlab.com/components/opentofu). +> +> Alternatively, you may build this project with the latest Terraform release yourself and +> host it in your own registry. + 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 serve the [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 widget. @@ -24,33 +30,33 @@ Should be the backend URL. For the GitLab backend it will be something like: ### `TF_USERNAME` -Is your user login name, which must have maintainer access. If this is unset, it will default to the value of GITLAB_USER_LOGIN which is the username that triggered the build. +Is your user login name, which must have maintainer access. If this is unset, it will default to the value of `GITLAB_USER_LOGIN` which is the username that triggered the build. ### `TF_PASSWORD` -An access token created for the above maintainer with the api scope. If this is unset, it will default to the value of CI_JOB_TOKEN and override the TF_USERNAME to match. +An access token created for the above maintainer with the `api` scope. If this is unset, it will default to the value of `CI_JOB_TOKEN` and override the `TF_USERNAME` to match. -## Support for Gitlab CI Environment Variables +## Support for GitLab CI Environment Variables -gitlab-terraform exposes the following Gitlab CI Environment Variables as TF_VAR inputs +`gitlab-terraform` exposes the following GitLab CI Environment Variables as `TF_VAR` inputs -- CI_JOB_ID +- `CI_JOB_ID` -- CI_COMMIT_SHA +- `CI_COMMIT_SHA` -- TF_VAR_CI_JOB_STAGE +- `TF_VAR_CI_JOB_STAGE` -- CI_PROJECT_ID +- `CI_PROJECT_ID` -- CI_PROJECT_NAME +- `CI_PROJECT_NAME` -- CI_PROJECT_NAMESPACE +- `CI_PROJECT_NAMESPACE` -- CI_PROJECT_PATH +- `CI_PROJECT_PATH` -- CI_PROJECT_URL +- `CI_PROJECT_URL` -You can use these in your terraform files in the following way +You can use these in your Terraform files in the following way ``` variable "CI_PROJECT_NAME" { @@ -72,9 +78,9 @@ If there's no other issue already discussing what you want, simply open a new is This project uses [Semantic Versioning](https://semver.org). We use commit messages to automatically determine the version bumps, so they should adhere to -the conventions of [Conventional Commits (v1.0.0)](https://www.conventionalcommits.org/en/v1.0.0/). +the conventions of [Conventional Commits `(v1.0.0)`](https://www.conventionalcommits.org/en/v1.0.0/). # Release Currently we release three versions of this image to support the last three stable major versions of Terraform. -The image versioning is documented [here](https://docs.gitlab.com/ee/user/infrastructure/iac/gitlab_terraform_helpers.html#terraform-images). \ No newline at end of file +The image versioning is documented [here](https://docs.gitlab.com/ee/user/infrastructure/iac/gitlab_terraform_helpers.html#terraform-images).