From 3da53ee0d995b9db8a6eb95781f87faac9ddf45d Mon Sep 17 00:00:00 2001
From: Timo Furrer <tfurrer@gitlab.com>
Date: Mon, 15 Jan 2024 13:22:10 +0100
Subject: [PATCH] Fix OpenTofu version

---
 .gitlab-ci.yml | 2 +-
 Dockerfile     | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7d75771..45dbeb3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,7 +12,7 @@ stages:
 .versions:
   parallel:
     matrix:
-      - OPENTOFU_VERSION: '1.6'
+      - OPENTOFU_VERSION: '1.6.0'
       - OPENTOFU_VERSION: '1.6.0-rc1'
 
 variables:
diff --git a/Dockerfile b/Dockerfile
index 114ec78..3a1e145 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,8 +2,6 @@ ARG BASE_IMAGE
 
 FROM $BASE_IMAGE
 
-ARG OPENTOFU_VERSION
-
 RUN apk add --no-cache \
   curl \
   gcompat \
@@ -16,9 +14,10 @@ RUN apk add --no-cache \
 # Install OpenTofu using the installer script in standalone mode
 # see https://opentofu.org/docs/intro/install/standalone
 # We may want to switch to installing manually from GitHub and verifying signature
+ARG OPENTOFU_VERSION
 RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh && \
     chmod +x install-opentofu.sh && \
-    OPENTOFU_VERSION=${OPENTOFU_VERSION} ./install-opentofu.sh --install-method standalone && \
+    ./install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}" && \
     rm ./install-opentofu.sh && \
     tofu --version
 
-- 
GitLab