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:

wget https://releases.hashicorp.com/terraform/0.12.23/terraform_0.12.23_linux_amd64.zip

  1. Unzip the file:

unzip terraform_0.12.23_linux_amd64.zip

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:

terraform

9. Check Terraform Version:

terraform -v

We are Done!!

Happy Learning !!!


Share At:
0 0 votes
Article Rating
Subscribe
Notify of
guest
6 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
binance sign up bonus
18 days ago

Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/en/register-person?ref=GJY4VW8W

creek gate io
29 days ago

I am sorting out relevant information about gate io recently, and I saw your article, and your creative ideas are of great help to me. However, I have doubts about some creative issues, can you answer them for me? I will continue to pay attention to your reply. Thanks.

adıyaman sağlık
5 months ago

thank you

konya sağlık
5 months ago

thank you

bursa ekonomi sitesi
5 months ago

thank you

afyon haberleri
5 months ago

thank you

Back To Top

Contact Us