From 27ac5709d7b338d99556d9ec29738107f9cdaa5a Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:59:54 +0000 Subject: [PATCH] chore: update Terraform to 1.12.2 Co-authored-by: sreya <4856196+sreya@users.noreply.github.com> --- .github/actions/setup-tf/action.yaml | 2 +- dogfood/coder/Dockerfile | 4 ++-- install.sh | 2 +- provisioner/terraform/install.go | 4 ++-- .../terraform/testdata/resources/presets/presets.tfplan.json | 4 ++-- .../terraform/testdata/resources/presets/presets.tfstate.json | 2 +- provisioner/terraform/testdata/version.txt | 2 +- scripts/Dockerfile.base | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-tf/action.yaml b/.github/actions/setup-tf/action.yaml index a29d107826ad8..0e19b657656be 100644 --- a/.github/actions/setup-tf/action.yaml +++ b/.github/actions/setup-tf/action.yaml @@ -7,5 +7,5 @@ runs: - name: Install Terraform uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 with: - terraform_version: 1.11.4 + terraform_version: 1.12.2 terraform_wrapper: false diff --git a/dogfood/coder/Dockerfile b/dogfood/coder/Dockerfile index 1909722459a18..0b439b2f3ef9a 100644 --- a/dogfood/coder/Dockerfile +++ b/dogfood/coder/Dockerfile @@ -204,9 +204,9 @@ RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/u # Configure FIPS-compliant policies update-crypto-policies --set FIPS -# NOTE: In scripts/Dockerfile.base we specifically install Terraform version 1.11.4. +# NOTE: In scripts/Dockerfile.base we specifically install Terraform version 1.12.2. # Installing the same version here to match. -RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.11.4/terraform_1.11.4_linux_amd64.zip" && \ +RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.12.2/terraform_1.12.2_linux_amd64.zip" && \ unzip /tmp/terraform.zip -d /usr/local/bin && \ rm -f /tmp/terraform.zip && \ chmod +x /usr/local/bin/terraform && \ diff --git a/install.sh b/install.sh index 0ce3d862325cd..6fc73fce11f21 100755 --- a/install.sh +++ b/install.sh @@ -273,7 +273,7 @@ EOF main() { MAINLINE=1 STABLE=0 - TERRAFORM_VERSION="1.11.4" + TERRAFORM_VERSION="1.12.2" if [ "${TRACE-}" ]; then set -x diff --git a/provisioner/terraform/install.go b/provisioner/terraform/install.go index 0f65f07d17a9c..dbb7d3f88917b 100644 --- a/provisioner/terraform/install.go +++ b/provisioner/terraform/install.go @@ -22,10 +22,10 @@ var ( // when Terraform is not available on the system. // NOTE: Keep this in sync with the version in scripts/Dockerfile.base. // NOTE: Keep this in sync with the version in install.sh. - TerraformVersion = version.Must(version.NewVersion("1.11.4")) + TerraformVersion = version.Must(version.NewVersion("1.12.2")) minTerraformVersion = version.Must(version.NewVersion("1.1.0")) - maxTerraformVersion = version.Must(version.NewVersion("1.11.9")) // use .9 to automatically allow patch releases + maxTerraformVersion = version.Must(version.NewVersion("1.12.9")) // use .9 to automatically allow patch releases errTerraformMinorVersionMismatch = xerrors.New("Terraform binary minor version mismatch.") ) diff --git a/provisioner/terraform/testdata/resources/presets/presets.tfplan.json b/provisioner/terraform/testdata/resources/presets/presets.tfplan.json index 56ac3151dce15..8d9e7935827c3 100644 --- a/provisioner/terraform/testdata/resources/presets/presets.tfplan.json +++ b/provisioner/terraform/testdata/resources/presets/presets.tfplan.json @@ -1,6 +1,6 @@ { "format_version": "1.2", - "terraform_version": "1.11.4", + "terraform_version": "1.12.2", "planned_values": { "root_module": { "resources": [ @@ -120,7 +120,7 @@ ], "prior_state": { "format_version": "1.0", - "terraform_version": "1.11.4", + "terraform_version": "1.12.2", "values": { "root_module": { "resources": [ diff --git a/provisioner/terraform/testdata/resources/presets/presets.tfstate.json b/provisioner/terraform/testdata/resources/presets/presets.tfstate.json index 102ae475cdd9f..7487b394b6e08 100644 --- a/provisioner/terraform/testdata/resources/presets/presets.tfstate.json +++ b/provisioner/terraform/testdata/resources/presets/presets.tfstate.json @@ -1,6 +1,6 @@ { "format_version": "1.0", - "terraform_version": "1.11.4", + "terraform_version": "1.12.2", "values": { "root_module": { "resources": [ diff --git a/provisioner/terraform/testdata/version.txt b/provisioner/terraform/testdata/version.txt index 3d0e62313ced1..6b89d58f861a7 100644 --- a/provisioner/terraform/testdata/version.txt +++ b/provisioner/terraform/testdata/version.txt @@ -1 +1 @@ -1.11.4 +1.12.2 diff --git a/scripts/Dockerfile.base b/scripts/Dockerfile.base index 6c8ab5a544e30..8bcb59c325b19 100644 --- a/scripts/Dockerfile.base +++ b/scripts/Dockerfile.base @@ -26,7 +26,7 @@ RUN apk add --no-cache \ # Terraform was disabled in the edge repo due to a build issue. # https://gitlab.alpinelinux.org/alpine/aports/-/commit/f3e263d94cfac02d594bef83790c280e045eba35 # Using wget for now. Note that busybox unzip doesn't support streaming. -RUN ARCH="$(arch)"; if [ "${ARCH}" == "x86_64" ]; then ARCH="amd64"; elif [ "${ARCH}" == "aarch64" ]; then ARCH="arm64"; elif [ "${ARCH}" == "armv7l" ]; then ARCH="arm"; fi; wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.11.4/terraform_1.11.4_linux_${ARCH}.zip" && \ +RUN ARCH="$(arch)"; if [ "${ARCH}" == "x86_64" ]; then ARCH="amd64"; elif [ "${ARCH}" == "aarch64" ]; then ARCH="arm64"; elif [ "${ARCH}" == "armv7l" ]; then ARCH="arm"; fi; wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.12.2/terraform_1.12.2_linux_${ARCH}.zip" && \ busybox unzip /tmp/terraform.zip -d /usr/local/bin && \ rm -f /tmp/terraform.zip && \ chmod +x /usr/local/bin/terraform && \