Skip to content

GovindSingh9447/VPC-3-Tier-Architecture-Design-Using-Terraform

Repository files navigation

Design a 3 Tier AWS VPC with NAT Gateways using Terraform

image

Introduction

  • Understand about Terraform Modules
  • Create VPC using Terraform Modules
  • Define Input Variables for VPC module and reference them in VPC Terraform Module
  • Define local values and reference them in VPC Terraform Module
  • Create terraform.tfvars to load variable values by default from this file
  • Create vpc.auto.tfvars to load variable values by default from this file related to a VPC
  • Define Output Values for VPC

Step: Execute Terraform Commands

# Working Folder
terraform-manifests/v2-vpc-module-standardized

# Terraform Initialize
terraform init

# Terraform Validate
terraform validate

# Terraform plan
terraform plan

# Terraform Apply
terraform apply -auto-approve
Observation:
1) Verify VPC
2) Verify Subnets
3) Verify IGW
4) Verify Public Route for Public Subnets
5) Verify no public route for private subnets
6) Verify NAT Gateway and Elastic IP for NAT Gateway
7) Verify NAT Gateway route for Private Subnets
8) Verify no public route or no NAT Gateway route to Database Subnets
9) Verify Tags

Step: Clean-Up

# Terraform Destroy
terraform destroy -auto-approve

# Delete Files
rm -rf .terraform*
rm -rf terraform.tfstate*

About

VPC-3-Tier-Architecture-Design-Using-Terraform

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages