How to compile a development version of Terraform

In this tutorial I’ll describe all the steps to build the development version of Terraform. At the end of this process, it will generate a set of binaries for each supported platforms(Linux, Mac OS X, Windows etc..).

First we need to clone the terraform’s github offical repo:

git clone

Move inside the cloned repo:

cd terraform

A Vagrantfile is provided with the official repo that uses the Vagrant virtual machine to provide a consistent environment with the pre-requisite tools in place.

Start the fresh VM(will download the vagrant box of around 350M):

vagrant up

Login to the machine:

vagrant ssh

Vagrant box comes with pre-installed Go and configures the $GOPATH at /opt/gopath, current “terraform” directory is then sync’d into the gopath:

cd /opt/gopath/src/

Verify the unit tests:

make test

Build the development version of Terraform from master or specific PR:

make bin

It will start process (which will take around 4/5 hours) to generate the binaries for each supported platforms and places them in the pkg directory.


njoy :-)

Hope this will help you!

Please Remember me in your prayers!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: