# Install Terraform on MacOS

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](https://learn.hashicorp.com/tutorials/terraform/install-cli).

### Using TFSwitch

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](https://github.com/warrensbox/terraform-switcher).  
Before starting make sure to uninstall Terraform if you have it already installed.

To install TFSwitch we can use homebrew:

```bash
brew install warrensbox/tap/tfswitch
```

### Using Homebrew

If you want to stick to the classical Terraform installation, you can still use homebrew:

```bash
brew install hashicorp/tap/terraform
```

You can verify your current version with:

```bash
terraform -v
```

### Manual Install

Terraform is distributed as a single binary, you can find the latest version on [Terraform website](https://www.terraform.io/downloads.html).  
After downloading Terraform we can simply put the binary in a directory listed in `PATH`.

```bash
mv ~/Downloads/terraform /usr/local/bin/
```

To check if the installation is working properly:

```bash
terraform -v
```
