Terraform on AWS: Nonprod and Production Environments · Network: VPC, Subnets, ALB and Security Groups

VPC, Subnets and NAT Gateway

Write a VPC module with public, private and database subnet tiers across three availability zones, using one NAT gateway in nonprod and one per AZ in production.

Members can save this page, take notes and track progress. See membership · Sign in

What you'll build

A modules/vpc module that creates a VPC, an internet gateway, three tiers of subnets across three availability zones, Elastic IPs and NAT gateways, and route tables. The module accepts a nat_gateway_count variable so nonprod saves cost with one NAT gateway while production gets one per AZ for high availability.

Premium course

Keep reading with a membership

The rest of this lesson, its practice questions and the whole Terraform on AWS: Nonprod and Production Environments course are part of the membership.

See plans Sign in

Open in the app to mark lessons complete, take notes and track your progress.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake