Install Terraform on MacOS
Navneet Singh G.
Azure Databricks ? Data Engineer ? PySpark ? SQL ? IaC ? Terraform ? Cloud Automation ? Agile Methodology ? AWS Cloud
Let's start with downloading the terraform binary file, signature file, check sums and HashiCorp's GPG Key.
HashiCorp GPG Key can be downloaded from: https://www.hashicorp.com/trust/security?ajs_aid=2ac9e1c8-143d-483c-b79a-93d3d0412a9a&product_intent=terraform
Step 2 is to install GPG - https://gpgtools.org
GPG is used to:
Step 3 is to check SHA256 Checksums matches the Terraform binary.
Command to check the same: shasum -a 256 -c terraform_1.6.3.=_SHA256SUMS
-a stands for algorithm
Note: I validated checksums against binary file using checksum which was exact match for my binary file. This was taken from terraform_1.6.3_SHA256SUMS.txt downloaded in Step 1.
8cad19d5f34c6ab2af21219fc3968ba30084f5e39bf219230706d360869ed8e9? terraform_1.6.3_darwin_arm64.zip
Step 4 is to extract the zipped Terraform binary file in a folder, point to that folder in terminal and then modify the PATH in Mac as:
% mv terraform /usr/local/bin
?While doing as above, I had faced Permission Error, which was fixed using:
% sudo chown -R $(whoami) /usr/local/bin
Now, we can verify if Terraform has installed correctly or not by running:
terraform -help
Above screenshot confirms terraform is installed successfully.