Skip to content

An example of an automated AWS VPC with both public and private subnets

Notifications You must be signed in to change notification settings

colinbut/aws-public-private-vpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An example of an automated AWS VPC with both public and private subnets

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages