From a6f1d10317aed5c53afbb80340db2bada3e8dd56 Mon Sep 17 00:00:00 2001
From: Ole Langbehn <ole.langbehn@inoio.de>
Date: Mon, 28 Oct 2024 15:38:43 +0100
Subject: [PATCH] NOISSUE replace shell or with terraform parameter for better
 readability and consistency

---
 terraform/environments/scripts/create-or-update-env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/terraform/environments/scripts/create-or-update-env.sh b/terraform/environments/scripts/create-or-update-env.sh
index 89d2951..0a0e9df 100755
--- a/terraform/environments/scripts/create-or-update-env.sh
+++ b/terraform/environments/scripts/create-or-update-env.sh
@@ -13,6 +13,6 @@ TAG=$2
 
 TF_LOG_PATH=terraform-init.log terraform init
 TF_LOG_PATH=terraform-version.log terraform version
-TF_LOG_PATH=terraform-workspace.log terraform workspace new "$WORKSPACE" || terraform workspace select "$WORKSPACE"
+TF_LOG_PATH=terraform-workspace.log terraform workspace select -or-create=true "$WORKSPACE"
 TF_LOG_PATH=terraform-plan.log terraform plan -var="image_tag=$TAG" -out plan -no-color | tee tfplan.plain
 TF_LOG_PATH=terraform-apply.log terraform apply -auto-approve -parallelism=50 plan
\ No newline at end of file
-- 
GitLab