Sha256: 9fe6609102f916dca7ae45f4a7bbe38a44f68a2a03ac61955605b36690295a65

Contents?: true

Size: 529 Bytes

Versions: 4

Compression:

Stored size: 529 Bytes

Contents

#!/bin/bash

set -eu

#TERRAFORM_VERSION=latest
TERRAFORM_VERSION=1.1.9

git clone https://github.com/tfutils/tfenv.git ~/.tfenv
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile
export PATH="$HOME/.tfenv/bin:$PATH"
tfenv install $TERRAFORM_VERSION
tfenv use $TERRAFORM_VERSION

# Generate wrapper so dont have to worry about adding .tfenv/bin to PATH in codebuild env
cat << 'EOL' > /usr/local/bin/terraform
#!/bin/bash
export PATH="$HOME/.tfenv/bin:$PATH"
exec terraform "$@"
EOL
chmod +x /usr/local/bin/terraform

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
terraspace-2.0.3 .cody/shared/script/install/terraform.sh
terraspace-2.0.2 .cody/shared/script/install/terraform.sh
terraspace-2.0.1 .cody/shared/script/install/terraform.sh
terraspace-2.0.0 .cody/shared/script/install/terraform.sh