blob: af18b2b4e1103d28af2223168ec8d10aa9826c60 [file] [log] [blame]
#!/bin/sh
set -eu
TOP=$(dirname $0)
update_terraform()
{
export TFVERS=0.12.28
if [ ! -x $TOP/.bin/terraform_${TFVERS} ]
then
(
mkdir -p $TOP/.bin/
cd $TOP/.bin
wget -q https://releases.hashicorp.com/terraform/${TFVERS}/terraform_${TFVERS}_linux_amd64.zip
unzip -o terraform_${TFVERS}_linux_amd64.zip
mv terraform terraform_${TFVERS}
chmod a+x terraform_${TFVERS}
ln -sf terraform_${TFVERS} terraform
rm terraform_${TFVERS}_linux_amd64.zip
)
fi
}
update_terraform
$TOP/.bin/terraform "$@"