Google Cloud: Installing and Configuring Terraform on a Compute Engine Instance

Share At:

Amazon Web Services: An Introduction to Terraform

In this tutorial we are going to learn how to install “Terraform” on a linux machine. For our demonstration purpose we will be using “google cloud compute instance” which will have “centos7” running.

Create a Compute Engine Instance

  1. From Google Cloud navigation, choose Compute Engine.
  2. In the main window pane, click Create.
  3. Name your instance instance-1.
  4. In the Boot disk section, click Change.
  5. Set Operating system to CentOS.
  6. Set Version to CentOS 7.
  7. Click Select.
  8. Click Create.

You will see a instance running:

Downloading and Installing Terraform

  1. Click SSH next to compute engine instance : instance-1 .
  2. Install necessary updates:

sudo yum update -ysudo yum install wget unzip -y

3. Download Terraform:


  1. Unzip the file:


5. Move Terraform to a directory called temp:

mkdir temp/

mv terraform temp/

6. Input the path to communicate with Terraform into the /etc profile file:

echo “PATH=’$PATH:~/temp/'” >> .bash_profile

7. Use the following in order to be able to call Terraform:

source .bash_profile

8. Call Terraform:


9. Check Terraform Version:

terraform -v

We are Done!!

Happy Learning !!!

Share At:
0 0 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
adıyaman sağlık
1 month ago

thank you

konya sağlık
1 month ago

thank you

bursa ekonomi sitesi
1 month ago

thank you

afyon haberleri
1 month ago

thank you

Back To Top

Contact Us