hands-on lab

Creating AWS Resources with Terraform

Beginner
Up to 1h
7,151
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 is a tool for declaring and managing infrastructure as code. With Terraform you can write declarative configuration files, view execution plans, and apply plans to realize the infrastructure declared in the configuration files. An important advantage of Terraform is that is supports over 100 resource providers including the major public cloud providers, such as Amazon Web Services, Microsoft Azure, and Google Cloud Platform. In this Lab, you will learn the basics of working with Terraform and create an Amazon Virtual Private Cloud (VPC) with Terraform.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Install Terraform on Linux
  • Configure Terraform providers
  • Create AWS resources with Terraform

Lab Prerequisites

You should be familiar with:

  • Working at the command-line in Linux
  • Amazon VPC basics 

Updates

March 12th, 2023 - Resolved an issue that caused the lab to fail to set up on rare occasions

July 6th, 2021 - Refactored lab to use EC2 Instance Connect, updated lab environment images, updated version of Terraform to latest

April 16th, 2021 - Moved validation checks to the most relevant lab step for more immediate validation feedback

August 28th, 2020 - Updated the SSH instructions to reflect the new EC2 user interface

July 18th, 2019 - Improved the validation Lab Step to further check the work you perform in the Lab

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

Environment before

Environment after

About the author
Avatar
Logan Rakai, opens in a new tab
Lead Content Developer - Labs
Students
218,186
Labs
223
Courses
9
Learning paths
57

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.

LinkedIn, Twitter, GitHub

Covered topics
Lab steps
Logging In to the Amazon Web Services Console
Connecting to the Virtual Machine using EC2 Instance Connect
Installing Terraform
Configuring Providers in Terraform
Creating an AWS Resource with Terraform