Git Based Terraform Template Management

Lab Steps

lock
Logging in to the Amazon Web Services Console
lock
Launch the Web IDE
lock
Git Clone Terraform Repo
lock
Perform Terraforming
lock
Git Commit and Push Updates

Ready for the real environment experience?

DifficultyBeginner
Time Limit1h
Students79
Ratings
5/5
starstarstarstarstar

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
Students54864
Labs42
Courses96
Learning paths46

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

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

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.
 

Covered Topics