Skip to content

Commit

Permalink
Update to terraform 1.9.6 (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocofaigh authored Sep 19, 2024
1 parent 2141da6 commit da96d7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
33 changes: 3 additions & 30 deletions module-assets/ci/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
#######################################
Expand Down
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}

0 comments on commit da96d7f

Please sign in to comment.