From 7a1e287a6806a9f02b8caa4572e94f783d6e1b6d Mon Sep 17 00:00:00 2001 From: Timo Furrer <tfurrer@gitlab.com> Date: Thu, 18 Jan 2024 20:05:31 +0100 Subject: [PATCH] Define variables --- backports/OpenTofu/Base.gitlab-ci.yml | 4 ++++ templates/full-pipeline.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/backports/OpenTofu/Base.gitlab-ci.yml b/backports/OpenTofu/Base.gitlab-ci.yml index 1989cd9..fecf6ef 100644 --- a/backports/OpenTofu/Base.gitlab-ci.yml +++ b/backports/OpenTofu/Base.gitlab-ci.yml @@ -28,6 +28,10 @@ variables: image: name: '$GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE/gitlab-opentofu:$GITLAB_OPENTOFU_VERSION-opentofu$OPENTOFU_VERSION' + variables: + TF_ROOT: $TF_ROOT + TF_STATE_NAME: $TF_STATE_NAME + cache: key: "$TF_ROOT" paths: diff --git a/templates/full-pipeline.yml b/templates/full-pipeline.yml index 856f554..8d616ad 100644 --- a/templates/full-pipeline.yml +++ b/templates/full-pipeline.yml @@ -66,6 +66,10 @@ spec: image: name: '$[[ inputs._image_registry_base ]]/gitlab-opentofu:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]' + variables: + TF_ROOT: $[[ inputs.root_dir ]] + TF_STATE_NAME: $[[ inputs.state_name ]] + cache: key: "$[[ inputs.root_dir ]]" paths: -- GitLab