top of page
400PngdpiLogoCropped.png

Terraform - Installation

Brief

I have been using Ansible for a about 2.5 years now and if you are familiar with Ansible, you will know that it is great for configuration management, but infrastructure, although very capable, falls down in a few areas. The general consensus that I have read is that Terraform fills this gap.


Method

Update 03/05/2021

You can now install Terraform using apt on Ubuntu.



The quick version:

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

sudo apt update && sudo apt install terraform

First of all you will need to install Terraform, I am using Ubuntu 18.04 writing this article so will initially cover this method first.


The download is available from: https://www.terraform.io/downloads.html


In this instance scroll to the Linux section and click the 64bit download link. This will download the Terraform binary which now needs to be added to your path to work.


The documentation points towards this article for help on adding this binary to your environment path. https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them


The easiest way I have found to accomplish this is by moving Terraform to my user local bin in my home directory:


First of all I printed my $PATH variable:

I then moved the Terraform binary that I had downloaded into .local/bin as I am the only one planning on using this computer I feel this suits my needs.


typing terraform into the CLI shows the Terraform options, so first step done.


Conclusion

Terraform is now installed! I will now start to read the learning tutorials and I will write some more posts as I progress through my Terraform journey.

Comentarios


bottom of page