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.
brew unlink terraform before continuing.
~ brew install tfenv
~ tfenv --version
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
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
Terraform verison has been switched to 0.14.3.
4. Check terraform version
Now let’s check terraform version.
~ ~ terraform -version
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.
My photography website: https://chetankphotos.com
Leave a Reply