jg75 / 3-tier-vpc-cloudformation-example

A cloudformation template to deploy a VPC with a public tier, an app tier and a db tier with high availability / failover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS VPC With Cloudformation Example


Deploying

You can deploy this from the command line, for example:

stack_name=my-vpc-example
parameters=(
    VpcCidrBlock='172.100.0.0/20'
    PrimaryPublicSubnetCidrBlock='172.100.0.0/22'
    SecondaryBackendSubnetCidrBlock='172.100.4.0/22'
    SecondaryPublicSubnetCidrBlock='172.100.8.0/23'
    PrimaryBackendSubnetCidrBlock='172.100.10.0/23'
    PrimaryAppSubnetCidrBlock='172.100.12.0/23'
    SecondaryAppSubnetCidrBlock='172.100.14.0/23'
)

aws cloudformation deploy \
    --template-file template.yml \
    --stack-name $stack_name \
    --parameter-overrides "${parameters[@]}"

About

A cloudformation template to deploy a VPC with a public tier, an app tier and a db tier with high availability / failover