diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index efbaf4b4daa925a18f3bc9d7e6544d423441b752..90ed49b187ceaa084184246cf19b9fb83d6784f5 100644 --- a/.gitlab/README.md.template +++ b/.gitlab/README.md.template @@ -181,6 +181,27 @@ Have a look at the individual template spec to learn about the available inputs. Have a look at the [`src/gitlab-tofu.sh`](src/gitlab-tofu.sh) script and how the `TF_`-prefixed variables are being used. You may set them according to your needs. +### Install additional tools + +The `gitlab-opentofu` container image deliberately comes with minimal tooling +to keep the image size small and be the least common denominator for our users. + +However, it is sometimes necessary to install additional tools. To do that you +can overwrite the included jobs with a `before_script` entry. The `gitlab-opentofu` +image uses `alpine` as its base image and therefore `apk` can be used to install +the tools. For example to install `jq`: + +```yaml +include: + - component: gitlab.com/components/opentofu/validate-plan@<VERSION> + inputs: + version: <VERSION> + opentofu_version: 1.6.1 + +plan: + before_script: + - apk add jq +``` ## Releases & Versioning diff --git a/README.md b/README.md index 249c6e2ac9884b37b6476e05b6952293b34f2436..3de30a30389dcd3575471c28748e72b356c19be7 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,27 @@ The following OpenTofu versions are available with this component via the `opent Have a look at the [`src/gitlab-tofu.sh`](src/gitlab-tofu.sh) script and how the `TF_`-prefixed variables are being used. You may set them according to your needs. +### Install additional tools + +The `gitlab-opentofu` container image deliberately comes with minimal tooling +to keep the image size small and be the least common denominator for our users. + +However, it is sometimes necessary to install additional tools. To do that you +can overwrite the included jobs with a `before_script` entry. The `gitlab-opentofu` +image uses `alpine` as its base image and therefore `apk` can be used to install +the tools. For example to install `jq`: + +```yaml +include: + - component: gitlab.com/components/opentofu/validate-plan@<VERSION> + inputs: + version: <VERSION> + opentofu_version: 1.6.1 + +plan: + before_script: + - apk add jq +``` ## Releases & Versioning