All hands-on labs

Premium Hands-on labbeginnerAWS

Create a VPC using Terraform

Create a fully functional VPC with public and private subnets, route tables, NAT Gateways, and an Internet Gateway. All using Terraform.

  • 7 guided tasks
  • Terminal in the browser

Scenario

This lab is part of the Terraform on AWS course. It continues the Getting started - building the VPC module and Building Subnets, Route Tables, and NAT Gateway lessons, where you write the VPC module that you'll deploy here. The Our project details lesson explains the project that this module starts. If you completed those lessons in your own terminal, open your project-ssm directory and continue to the next task.

You can also see the course project code on GitHub. The repository holds the finished project, so it also includes the modules from later lessons.

Now that we've written the code, it's time to test it and verify it by deploying our VPC and its resources!

What you will learn

  • Write a Terraform VPC module with public and private subnets, route tables, an Internet Gateway, and NAT Gateways.
  • Call the module from a root configuration in us-east-1.
  • Initialize, validate, plan, and apply the configuration.
  • View the network in the VPC resource map and remove it with terraform destroy.
Hands-on lab

Create a VPC using Terraform

Included in Cybr Premium.