An open API service indexing awesome lists of open source software.

https://github.com/colinbut/aws-public-private-vpc

An example of an automated AWS VPC with both public and private subnets
https://github.com/colinbut/aws-public-private-vpc

aws aws-cloudformation aws-vpc cloudformation private-subnets public-subnets vpc

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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:

```bash
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

```bash
terraform init
```

```bash
terraform plan
```

```bash
terraform apply
```