From dcf9d7e3efbbe791db1a21de1dd21abf2ff22f81 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 10 Jan 2021 22:23:13 +0100 Subject: terraform in minio --- bin/terraform | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/terraform (limited to 'bin/terraform') diff --git a/bin/terraform b/bin/terraform new file mode 100755 index 0000000..06c2a76 --- /dev/null +++ b/bin/terraform @@ -0,0 +1,25 @@ +#!/bin/bash + +set -euo pipefail +#set -x + +basedir="$(dirname $0)" + +terraform_version=0.13.5 +terraform_url=https://releases.hashicorp.com/terraform/$terraform_version/terraform_${terraform_version}_linux_amd64.zip + +dl_d=$basedir/.terraform/dl +zip_file=$dl_d/terraform-${terraform_version}.zip +unzip_d=$basedir/.terraform/unzip/$terraform_version +cmd=$unzip_d/terraform + +if [[ ! -x $cmd ]] +then + mkdir -p $dl_d + curl -L -o "$zip_file" $terraform_url + rm -rf $unzip_d + mkdir -p $unzip_d + unzip $zip_file -d $unzip_d +fi + +exec "$cmd" "${@}" -- cgit v1.2.3