Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade Terraform version

Tags:

terraform

I'm start using Terraform and I'm following the project updates on his Github repository.

I see new releases are available on releases section: https://github.com/hashicorp/terraform/releases

I installed Terraform tool following the steps: https://www.terraform.io/intro/getting-started/install.html

The new releases are a zip file with base code but I want to know how I can install it on my computer (OSX). What I downloaded when I installed for the first time was a zip file with just a "terraform" file as unix executable.

How I can generate this Unix executable from the zip available on the github releases section?

Any idea?

Thank you!

like image 515
Borja Lopez Avatar asked Nov 28 '16 14:11

Borja Lopez


People also ask

How do I change Terraform versions?

You can switch between different versions of terraform by typing the command tfswitch on your terminal. Select the version of terraform you require by using the up and down arrow. Hit Enter to select the desired version.

How do I update my Terraform 11 to 12?

Run the Terraform 0.12upgrade command The command given above will start at the directory containing all of your Terraform modules and work through them one by one, running the upgrade command along the way. It will update the Terraform syntax in each module.

Should I upgrade Terraform version?

We strongly recommend completing an upgrade to the latest Terraform v0. 11 release first. This will give you an opportunity to address any changes required for the previous major version upgrades separately, rather than making multiple changes at once.


1 Answers

If you use Homebrew on MacOS already, you can install Terraform simply by

$ brew install terraform 

and upgrade by

$ brew upgrade terraform 

In fact, you might be interested in letting Homebrew also control other tools:

$ brew install awscli $ brew install packer $ brew cask install docker $ brew cask install virtualbox $ brew cask install vagrant 
like image 176
jpsecher Avatar answered Sep 19 '22 15:09

jpsecher