Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 844 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 844 Bytes

AWS Public-Private - VPC

This repo contains an examples of both a Cloudformation template and a Terraform configuration to build a VPC with 2x Public Subnets & 2x Private Subnets

An Internet Gateway is launched and is attached to the VPC so that outbound & inbound internet traffic permits

Resources launched inside the private Subnets (e.g. EC2 instances) would not be able to talk to the internet by default but can do so by way of contacting a NAT Gateway which is resided in the corresponding Public Subnet.

Cloudformation

via the AWS CLI:

aws cloudformation create-stack --stack-name [your-stack-name] --template-body public-private-vpc.yml

where [your-stack-name] is your chosen name for your Cloudformation stack

Terraform

terraform init
terraform plan
terraform apply