VPC Setup
Author: Fabrizio Branca, (*1)
"Inspired" by this blog post (code), (*2)
This template is intended to be used with StackFormation - a CLI tool that helps you manage and deploy
CloudFormation stacks and also does some preprocessing (e.g. introduces Fn::FileContent
), (*3)
This concept of setting up a VPC consists of two parts:, (*4)
1.) Deploy the vpc.template
for the basic VPC and Internet Gateway setup, (*5)
2.) Deploy the az.template
for every availability zone you want to use in your VPC. This template will create a public
and a private subnet including all routes (+ tables + associations) and a NAT Gateway (+ Elastic IP)
Using a separate template for every AZ allows you to keep the code DRY. StackFormation' s
prefixed template merging feature helps you to combine all the AZ templates into one and deploy them as a single CloudFormation template.
Check blueprints.example.yml for an example., (*6)