Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

179 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Support My Content Here:

Udemy Github Sponsor

HashiCorp Terraform Labs

Teraform Version Terraform Tests

Welcome to this HashiCorp Terraform lab repo, where you can get hands-on experience with HashiCorp Terraform using GitHub Codespaces. In this repository, you’ll find a variety of labs that walk you through learning and using HashiCorp Terraform in different scenarios.

Terraform Version: This repo purposely uses Terraform 1.12.x to align with the HashiCorp Certified: Terraform Associate 004 exam objectives. Labs may not work with newer versions of Terraform, so please ensure you are using the correct version.

Note: GitHub provides users with 120 core hours for FREE per month. Check your current consumption of hours here. Additionally, you can set a limit of spending for Codespaces on your account here.

What’s Included

  • A pre-configured development container that installs Terraform and prerequisites in your Codespace.
  • Multiple labs, each with its own README.md and step-by-step instructions.
  • Example files, scripts, and configurations to help you practice Terraform's core features.

Built with:

terraform Codespaces Amazon Web Services Azure VSCode

How to Use

  1. Create a Codespace from this repo (click the button below or go to the “Code” drop-down, select “Codespaces,” and create a new one).
  2. Once the Codespace is running, open the integrated terminal.
  3. Follow the instructions in each lab to complete the exercises.

Open in GitHub Codespaces

Labs Overview

Below are different labs you can explore. Each link points to a specific lab file or folder within this repository.

Each lab is available in AWS, Azure, or GitHub - allowing you to choose the platform you're most comfortable with to learn.

💻 HashiCorp Terraform Basics 💻

Labs 1 through 5 are designed to be completed in order as each builds on the previous lab.

# Lab Name AWS Azure GitHub
1 Getting Started with Terraform AWS Azure GitHub
2 Create Your First Resource AWS Azure GitHub
3 Working with Variables and Dependencies AWS Azure GitHub
4 Managing Mulitple Resources AWS Azure GitHub
5 Working with State, Data Sources, and the CLI AWS Azure GitHub

✨ Making Code More Dynamic and Reusable ✨

These labs are fully self-contained and can be completed in any order.

# Lab Name AWS Azure GitHub
6 Making Code Dynamic and Reusable AWS Azure GitHub
7 Simplify Code with Local Values AWS Azure GitHub
8 Create Mulitple Resources with count AWS Azure GitHub
9 Deploy Mulitple Resources with for_each AWS Azure GitHub
10 Managing Explicit Dependencies with depends_on AWS Azure GitHub
11 Using Multiple Providers for Mulitple Regions AWS Azure GitHub
12 Managing Resource Lifecycle using lifecycle AWS Azure GitHub
13 Using Terraform Built-In Functions AWS Azure GitHub

⚙️ Working with Terraform Modules ⚙️

These labs are fully self-contained and can be completed in any order.

# Lab Name AWS Azure GitHub
14 Using Modules in the Terraform Registry AWS Azure GitHub
15 Build Your Own Local Modules AWS Azure GitHub

🔧 Managing and Maintaining Your Terraform Code 🔧

These labs are fully self-contained and can be completed in any order.

# Lab Name AWS Azure GitHub
16 Replacing a Single Resource AWS Azure GitHub
17 Upgrading a Provider and Module AWS Azure GitHub
18 Refactoring State with moved and removed AWS Azure GitHub
19 Importing an Existing Resource AWS Azure GitHub
20 Migrating State to a New Backend AWS Azure N/A


Contributing

If you’d like to add more labs or improve these, feel free to fork this repo or open a pull request. Feedback and contributions are always welcome!


Enjoy your journey with Terraform!

About

HashiCorp Terraform training environment using GitHub Codespaces. This pre-configured development environment includes the latest version of Terraform CLI along with AWS and Azure CLIs for hands-on infrastructure as code exercises.

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages