From 00f5ccbad78bd04aaa2d2a00e4fb668d7b5b435f Mon Sep 17 00:00:00 2001
From: Timo Furrer <tuxtimo@gmail.com>
Date: Thu, 10 Apr 2025 10:08:03 +0200
Subject: [PATCH] Use GITLAB_TOFU_STATE_NAME for plan job resource_group value

This change set uses the `GITLAB_TOFU_STATE_NAME` environment variable
as the value for the `resource_group` in the `plan` job. This aligns
with the other jobs, like `apply` and `destroy` and explicitly allows
for matrix support.

Closes #125

Changelog: changed
---
 templates/plan.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/plan.yml b/templates/plan.yml
index 52b2186..484aadb 100644
--- a/templates/plan.yml
+++ b/templates/plan.yml
@@ -188,7 +188,7 @@ include:
   environment:
     name: $[[ inputs.state_name ]]
     action: prepare
-  resource_group: $[[ inputs.state_name ]]
+  resource_group: $GITLAB_TOFU_STATE_NAME
   artifacts:
     # Terraform's cache files can include secrets which can be accidentally exposed.
     # Please exercise caution when utilizing secrets in your Terraform infrastructure and
-- 
GitLab