Created
December 20, 2014 06:06
-
-
Save ageekymonk/6569e94e095ce3ba5b9b to your computer and use it in GitHub Desktop.
Cloudformation Script to create a VPC with one subnet in aws
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS Template to create a a VPC", | |
"Resources" : { | |
"VPC" : { | |
"Type" : "AWS::EC2::VPC", | |
"Properties" : { | |
"CidrBlock" : "10.0.0.0/16", | |
"Tags" : [ {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} } ] | |
} | |
}, | |
"Subnet" : { | |
"Type" : "AWS::EC2::Subnet", | |
"Properties" : { | |
"VpcId" : { "Ref" : "VPC" }, | |
"CidrBlock" : "10.0.0.0/24", | |
"Tags" : [ {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} } ] | |
} | |
}, | |
"InternetGateway" : { | |
"Type" : "AWS::EC2::InternetGateway", | |
"Properties" : { | |
"Tags" : [ {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} } ] | |
} | |
}, | |
"AttachGateway" : { | |
"Type" : "AWS::EC2::VPCGatewayAttachment", | |
"Properties" : { | |
"VpcId" : { "Ref" : "VPC" }, | |
"InternetGatewayId" : { "Ref" : "InternetGateway" } | |
} | |
}, | |
"RouteTable" : { | |
"Type" : "AWS::EC2::RouteTable", | |
"Properties" : { | |
"VpcId" : {"Ref" : "VPC"}, | |
"Tags" : [ {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} } ] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment