diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-04 19:22:44 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-04 19:22:44 +0100 |
commit | bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe (patch) | |
tree | 1ae2ec546cdbc38d6d6b7c0933e2753abaaabf0c /bin | |
parent | 6fbf9f40f88f51450cc2d2dbbc46ca5c70ffbad0 (diff) | |
download | infra-bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe.tar.gz infra-bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe.tar.bz2 infra-bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe.tar.xz infra-bb672e7cbf2ca71f33e4b2a647ad42c15a2965fe.zip |
bin/terraform: Upgrading to 1.3.6
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/terraform | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/bin/terraform b/bin/terraform index ac2d331..d90a3d8 100755 --- a/bin/terraform +++ b/bin/terraform @@ -2,10 +2,27 @@ set -euo pipefail -basedir=$(dirname "$0") +version=1.3.6 -terraform_version=1.0.7 -terraform_url=https://releases.hashicorp.com/terraform/$terraform_version/terraform_${terraform_version}_linux_amd64.zip +basedir="${0%/*}" + +s=$(uname -s) +case "$s" +in + Darwin) s=darwin ;; + Linux) s=linux ;; + *) echo "Unsupported system: $s" >/dev/stderr ;; +esac + +m=$(uname -m) +case "$m" +in + x86_64) m=amd64 ;; + arm64) ;; + *) echo "Unsupported machine: $m" >/dev/stderr ;; +esac + +url=https://releases.hashicorp.com/terraform/${version}/terraform_${version}_${s}_${m}.zip bin="$basedir/.tmp/$version/terraform" |