Switch Terraform versions easily on Mac

Switch Terraform versions on Mac

In this tutorial I will show you how to switch terraform versions on Mac. We will be going to use tfenv to install and switch the versions. Let’s get started.

Read Also: Install specific version of terraform mac with brew

1. Install tfenv with brew

We are going to use tfenv to switch terraform version. tfenv makes it easier to switch to different terraform versions.

Note: Please brew unlink terraform before continuing.

~ brew install tfenv 

 ~ tfenv --version
tfenv 2.2.2 

2. Install specific version of terraform mac

tfenv install 0.14.3

~ tfenv list
No default set. Set with 'tfenv use <version>'

As the not says you have to set the  default version.

~ tfenv use 1.0.0
Switching default version to v1.0.0
Switching completed

Note: If you see the oldest version installed with brew then you need to uninstall it. You can uninstall using for example brew uninstall [email protected]

3. Switch Terraform versions

Now we can easily switch terraform version. Let’s see how.

 ~ tfenv use 0.14.3
Switching default version to v0.14.3
Switching completed

Terraform verison has been switched to 0.14.3.

4. Check terraform version

Now let’s check terraform version.

~ ~ terraform -version
Terraform v0.14.3

Please let me know how you liked the tutorial. Please comment below what you want to learn next or topics I should write tutorials.
It would be great if you can help me keeping this blog up and running by contributing little bit. You can use the following link to help me.

Buy me a coffeeBuy me a coffee

My photography website:

Leave a Reply

Your email address will not be published.


The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99