Last active
November 21, 2022 07:35
-
-
Save HammoTime/dc39b76e2579023679b3f52784fab546 to your computer and use it in GitHub Desktop.
Install Terraform on a Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install jq | |
brew install wget | |
cd ~ | |
version=$(curl https://api.github.com/repos/hashicorp/terraform/releases/latest --silent | jq ".tag_name" -r) | |
version=$(echo $version | sed 's/v//g') # get rid of 'v' from version number | |
echo "Installing Terraform $version." | |
url="https://releases.hashicorp.com/terraform/$version/terraform_$(echo $version)_darwin_amd64.zip" | |
wget $url | |
unzip "terraform_$(echo $version)_darwin_amd64.zip" | |
chmod +x terraform | |
sudo mv terraform /usr/local/bin/ | |
echo "Terraform $version installed." | |
rm "terraform_$(echo $version)_darwin_amd64.zip" | |
echo "Install files cleaned up." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not working on Mac Air - 2022 - Intel Chip