From f5c000d0e71a1abcd552fbdfb71120ed303382e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20B=C3=A9jean?= <nicolas@bejean.fr>
Date: Thu, 9 Dec 2021 21:35:25 +0100
Subject: [PATCH] Use Gitlab Terraform state

---
 .gitlab-ci.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a8166ae..9865b48 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,9 @@
 image: busybox:latest
 
+variables:
+  TF_ROOT: ${CI_PROJECT_DIR}/manifests/elastic
+  TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/manifests/elastic
+
 cache:
   key: manifests-elastic
   paths:
@@ -14,8 +18,6 @@ elastic:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
   variables:
-    TF_ROOT: ${CI_PROJECT_DIR}/manifests/elastic
-    TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/manifests/elastic
     TF_VAR_ec_apikey: $EC_API_KEY
   script:
     - cd ${TF_ROOT}
-- 
GitLab