hands-on lab

Git Based Terraform Template Management

Beginner
1h
351
4.7/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Terraform, a popular IaC (Infrastructure as Code) tool, can be used to provision infrastructure safely and efficiently. When working with Terraform, your resources are codified into Terraform templates, which then should be version-controlled within a source control system such as Git

In this Lab scenario, you'll learn how to use both Terraform and Git to manage and maintain resources launched within AWS.

Learning Objectives

Upon completion of this Lab, you will be able to:

  • Use Git (GUI and Commandline) to
    • Clone a sample repository containing a Terraform template
    • View and examine differences made to the working copy of the Terraform template
    • Stage changes into Staging
    • Create a new commit within the local repository
    • Push the local repository changes back to the origin repository
    • View repository logs (local and remote/origin)
  • Use Terraform to:
    • Update an existing Terraform template to provision a single EC2 instance
    • Initialize a working directory (terraform init)
    • Create an execution plan (terraform plan)
    • Apply changes to reach the desired state of the configuration (terraform apply)

You should:

  • Be comfortable with basic Linux command line administration

Lab Environment

This lab will start with the following AWS resources provisioned automatically for you:

  • 1 x EC2 instance
    • ide.cloudacademy.platform.instance - provides a web-based IDE with integrated terminal

To achieve the lab end state, you will be walked through the process of:

  • Using your local workstation browser to remotely connect to the ide.cloudacademy.platform.instance
  • Using the web-based IDE and integrated terminal, you'll complete the remainder of the stated Learning Objectives (above)

About the author
Avatar
Jeremy Cook, opens in a new tab
Content Lead Architect
Students
160,717
Labs
80
Courses
108
Learning paths
213

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).

Covered topics
Lab steps
Logging In to the Amazon Web Services Console
Launch the Web IDE
Git Clone Terraform Repo
Perform Terraforming
Git Commit and Push Updates