Install Terraform on MacOS

Search for a command to run...

No comments yet. Be the first to comment.
Intro When working on a monolith and traffic increases, you might decide to start caching to manage the new volume. If your system is modern or small, you have several caching strategies: Handle the caching logic within the code by integrating somet...
The AWS CLI sync command is a powerful tool for copying new and updated files between a source and destination, with at least one of them being an S3 Bucket. This command can also be used to perform sync between S3 Buckets without the need to transit...

A tutorial using the AWS console

A Step Function Distributed Map and Lambda Demo

Amazon CloudFront CloudFront is Amazon’s offer for Content Delivery Network. The CDN is composed of a globally distributed set of caching servers that provide low latency and high throughput all around the world. The network is based on more than 300...

Installing Terraform on MacOS is pretty simple, we have several different ways of doing it:
Using Homebrew
Manual Installation from binary
Using TFSwitch
Official Terraform documentation.
I will start with the third method because I like the tool. TFSwitch is an open-source project that allows you to easily switch Terraform's version. TFSwitch is created and maintained by warrensbox, here the GitHub repo.
Before starting make sure to uninstall Terraform if you have it already installed.
To install TFSwitch we can use homebrew:
brew install warrensbox/tap/tfswitch
If you want to stick to the classical Terraform installation, you can still use homebrew:
brew install hashicorp/tap/terraform
You can verify your current version with:
terraform -v
Terraform is distributed as a single binary, you can find the latest version on Terraform website.
After downloading Terraform we can simply put the binary in a directory listed in PATH.
mv ~/Downloads/terraform /usr/local/bin/
To check if the installation is working properly:
terraform -v