Skip to main content
In this lesson, we’ll authenticate into a temporary AWS lab account, inspect our Terragrunt configuration, and deploy a VPC module. Follow along to learn how to initialize, plan, apply, and clean up with Terragrunt.

1. Authenticate to the AWS Lab Account

When the lab starts, you’ll receive a URL and temporary credentials:
The image shows a split-screen view with an AWS login page on the left, displaying credentials for a Terragrunt lab, and a Visual Studio Code editor on the right with instructions for using the terminal.
  1. Open the provided URL in your browser.
  2. Log in with the displayed username and password.
  3. If you lose your credentials, run:
This lab account has limited AWS permissions. Only perform the tasks outlined in this lesson to avoid permission errors.

2. Confirm Terraform & Terragrunt Versions

SSH into the AWS client server and verify your toolchain:

3. Inspect the VPC Module

Navigate to the aws-stack/vpc directory where the VPC module lives:
Open terragrunt.hcl to review:

Provider Version Override

To ensure compatibility, this module locks the AWS provider to major version 5:
Locking the AWS provider version prevents unexpected breaking changes when Terraform and modules update.

4. Initialize the Terragrunt Project

Initialize the backend and download provider plugins:
You should see:

5. Plan the VPC Deployment

Generate and review the execution plan:
Look for the summary at the end:

6. Apply the Configuration

Create the VPC resources:
Type yes when prompted. After completion:
In the AWS console (US East 1), verify your VPC:
The image shows an AWS VPC dashboard with a list of virtual private clouds (VPCs). It displays details such as VPC ID, state, and CIDR information.

7. Clean Up: Destroy the VPC

Remove all created resources to avoid incurring costs:
Confirm with yes. You’ll see:
The AWS console will now only list the default VPC.

References

Watch Video

Practice Lab