Skip to content

Commit

Permalink
adds tfenv and topgrade config
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gohlke committed Jan 26, 2024
1 parent 1004ed0 commit a219764
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/terraform.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#!/bin/bash

if ! command -v terraform >/dev/null; then
echo "install terraform"
brew install terraform
echo "install terraform via tfenv"
brew install tfenv
# install latest
tfenv install latest && tfenv use
fi

if [[ -d ~/.config/topgrade ]] && ! [[ -f ~/.config/topgrade/tfenv.toml ]] && ! command -v topgrade >/dev/null; then
cat << EOF > ~/.config/topgrade/tfenv.toml
[commands]
"Terraform: tfenv" = "tfenv install latest && tfenv use"
EOF
fi

if ! command -v tflint >/dev/null; then
Expand Down

0 comments on commit a219764

Please sign in to comment.