diff --git a/src/oracle/install/terraform/install_terraform.sh b/src/oracle/install/terraform/install_terraform.sh index abc837a..4cafb5f 100644 --- a/src/oracle/install/terraform/install_terraform.sh +++ b/src/oracle/install/terraform/install_terraform.sh @@ -1,17 +1,20 @@ #!/usr/bin/env bash set -ex + ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') + if [ "${ARCH}" == "arm64" ] ; then echo "Terraform for arm64 currently not supported, skipping install" exit 0 fi + if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|rhel9|almalinux9|almalinux8) ]]; then dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo dnf install -y terraform if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all fi -elif [[ "${DISTRO}" == @(fedora39|fedora40) ]]; then +elif [[ "${DISTRO}" == @(fedora40) ]]; then dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo # use fedora40 hashicorp packages for terraform sed -i 's/$releasever/40/g' /etc/yum.repos.d/hashicorp.repo @@ -19,6 +22,9 @@ elif [[ "${DISTRO}" == @(fedora39|fedora40) ]]; then if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all fi +elif [[ "${DISTRO}" == @(fedora38|fedora39) ]]; then + # skip installation for fedora38 and fedora39 + echo "Skipping terraform install for ${DISTRO}, as it is not officially supported by HashiCorp." else yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo yum install -y terraform