hands-on lab

Exploring Terraform State

Beginner
Up to 40m
3,305
4.6/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.

Description

Terraform uses a system called Terraform State to keep track of resources managed and deployed through Terraform. This is a critical concept to understand as a Terraform infrastructure developer because Terraform state will always need to be kept in mind when architecting solutions. The state file acts as a database for mapping resources in AWS to the Terraform configuration file. It allows Terraform to have a declarative approach when it comes to infrastructure and provides performance boosts with large-scale infrastructure automation. 

In this lab, you will learn how Terraform keeps track of the resources that it manages through the Terraform state.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Understand how Terraform state works
  • Create, update, and restore a terraform.tfstate file

Intended audience

This lab is intended for:

  • Individuals studying to take the HashiCorp Certified: Terraform Associate exam
  • Anyone interested in learning how to use Terraform to manage Cloud Service Providers

Prerequisites

You should be familiar with:

  • Cloud Services
  • DevOps

The following course can be used to fulfill the prerequisites:

Updates

November 15th, 2023 - Lab updated to utilize CodeTour IDE

April 24th, 2023 - Resolved IDE delay

October 27th, 2022 - Updated instructions for clarity

March 28th, 2022 - Updated instructions

Environment before

Environment after

About the author

Avatar
Jun Fritz, opens in a new tab
Cloud Labs Developer
Students
40,972
Labs
111
Courses
1
Learning paths
6

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics

Lab steps

Exploring Terraform State