Install and configure Terraform

Install Terraform

Become root user, and let's perform a few updates

ubuntu@deploymentmachine:~$ sudo -i
root@deploymentmachine:~#
root@deploymentmachine:~#
root@deploymentmachine:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:2 http://eu-frankfurt-1-ad-3.clouds.archive.ubuntu.com/ubuntu focal InRelease
[...]

from link: https://learn.hashicorp.com/tutorials/terraform/install-cli

Hashicorp provides a very useful tuturial on how to install Terraform, depending on your OS:

Since my machine is on Ubuntu, I will perform the Linux steps:

  • Add key and official repository

  • Perform updates so changes can take place:

  • Intall Terraform

  • Check if installation has been a success by running a simple command:

Setup Terraform for OCI Cloud

You will need to provide the following environment variables:

In case you have not setup your .oci folder or you are not aware how to find these details, check my tutorial on Install and configure OCI CLI - it explains step by step how to setup a fingerprint, a private key and how to find the rest of required information.

Once you have completed all these steps, go to next tutorial, Terraform - small test, to make sure your configuration is setup correctly.

Last updated