From da96d7fbc88efbcc5a97ac9b8a1b3cc05506858f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Conall=20=C3=93=20Cofaigh?= Date: Thu, 19 Sep 2024 18:18:39 +0100 Subject: [PATCH] Update to terraform 1.9.6 (#1038) --- module-assets/ci/install-deps.sh | 33 +++----------------------------- renovate.json | 6 ++++++ 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/module-assets/ci/install-deps.sh b/module-assets/ci/install-deps.sh index 800962d6..57830f41 100755 --- a/module-assets/ci/install-deps.sh +++ b/module-assets/ci/install-deps.sh @@ -217,8 +217,9 @@ fi # terraform ####################################### -# Locking into last version that is supported by Schematics -TERRAFORM_VERSION=v1.6.6 +# The rule in renovate.json will only allow patch updates. Minor version updates need to be done manually as we need to wait for Schematics to support it first before updating. + # renovate: datasource=github-releases depName=hashicorp/terraform +TERRAFORM_VERSION=v1.9.6 BINARY=terraform set +e @@ -244,34 +245,6 @@ else echo "${BINARY} ${TERRAFORM_VERSION} already installed - skipping install" fi -####################################### -# tofu -####################################### - -# Locking into latest version in the 1.6.x major until Terraform provider limitations are removed -TOFU_VERSION=v1.6.2 -BINARY=tofu -set +e -INSTALLED_TOFU_VERSION="$(tofu --version | head -1 | cut -d' ' -f2)" -set -e -if [[ "$TOFU_VERSION" != "$INSTALLED_TOFU_VERSION" ]]; then - FILE_NAME="tofu_${TOFU_VERSION//v}_${OS}_${ARCH}.zip" - URL="https://github.com/opentofu/opentofu/releases/download/${TOFU_VERSION}" - SUMFILE="tofu_${TOFU_VERSION//v}_SHA256SUMS" - TMP_DIR=$(mktemp -d /tmp/${BINARY}-XXXXX) - - echo - echo "-- Installing ${BINARY} ${TOFU_VERSION}..." - - download ${BINARY} ${TOFU_VERSION} ${URL} "${FILE_NAME}" "${SUMFILE}" "${TMP_DIR}" - verify "${FILE_NAME}" "${SUMFILE}" "${TMP_DIR}" - unzip "${TMP_DIR}/${FILE_NAME}" -d "${TMP_DIR}" > /dev/null - copy_replace_binary ${BINARY} "${TMP_DIR}" - clean "${TMP_DIR}" -else - echo "${BINARY} ${TOFU_VERSION} already installed - skipping install" -fi - ####################################### # terraform-docs ####################################### diff --git a/renovate.json b/renovate.json index 1f2434db..c2acf433 100644 --- a/renovate.json +++ b/renovate.json @@ -22,6 +22,12 @@ "description": "Ignore updates to checkov until https://github.com/bridgecrewio/checkov/issues/5945 is fixed", "matchPackageNames": ["bridgecrewio/checkov"], "enabled": false + }, + { + "description": "Only allow patch updates for terraform version. Minor and Major updates need to be done manually to keep in sync with what Schematics supports.", + "matchPackageNames": ["hashicorp/terraform"], + "matchUpdateTypes": ["major", "minor"], + "enabled": false } ] }