Created
February 10, 2017 16:28
-
-
Save marrobi/e8ba1e4391cd8ee406d6bf3be3458ffe to your computer and use it in GitHub Desktop.
CloudFormation Virtual Private Cloud
This file contains 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
"VPC" : { | |
"Type" : "AWS::EC2::VPC", | |
"Properties" : { | |
"CidrBlock" : { "Fn::FindInMap" : [ "SubnetConfig", "VPC", "CIDR" ]}, | |
"EnableDnsSupport" : "true", | |
"EnableDnsHostnames" : "true", | |
"Tags" : [ | |
{ "Key" : "Application", "Value" : { "Ref" : "AWS::StackId" } }, | |
{ "Key" : "Name", "Value" : {"Ref" : "orbiteraCustomerId"}}, | |
{ "Key" : "Network", "Value" : "Public" } | |
] | |
} | |
}, | |
"PublicSubnetA" : { | |
"Type" : "AWS::EC2::Subnet", | |
"DependsOn" : "VPC", | |
"Properties" : { | |
"VpcId" : { "Ref" : "VPC" }, | |
"CidrBlock" : { "Fn::FindInMap" : [ "SubnetConfig", "PublicSubnetA", "CIDR" ]}, | |
"Tags" : [ | |
{ "Key" : "Application", "Value" : { "Ref" : "AWS::StackId" } }, | |
{ "Key" : "Network", "Value" : "PublicSubnetA" } | |
] | |
} | |
}, | |
"InternetGateway" : { | |
"Type" : "AWS::EC2::InternetGateway", | |
"Properties" : { | |
"Tags" : [ | |
{ "Key" : "Application", "Value" : { "Ref" : "AWS::StackId" } }, | |
{ "Key" : "Network", "Value" : "Public" } | |
] | |
} | |
}, | |
"GatewayToInternet" : { | |
"Type" : "AWS::EC2::VPCGatewayAttachment", | |
"Properties" : { | |
"VpcId" : { "Ref" : "VPC" }, | |
"InternetGatewayId" : { "Ref" : "InternetGateway" } | |
} | |
}, | |
"PublicRouteTable" : { | |
"Type" : "AWS::EC2::RouteTable", | |
"Properties" : { | |
"VpcId" : { "Ref" : "VPC" }, | |
"Tags" : [ | |
{ "Key" : "Application", "Value" : { "Ref" : "AWS::StackId" } }, | |
{ "Key" : "Network", "Value" : "Public" } | |
] | |
} | |
}, | |
"PublicRoute" : { | |
"Type" : "AWS::EC2::Route", | |
"DependsOn" : "GatewayToInternet", | |
"Properties" : { | |
"RouteTableId" : { "Ref" : "PublicRouteTable" }, | |
"DestinationCidrBlock" : "0.0.0.0/0", | |
"GatewayId" : { "Ref" : "InternetGateway" } | |
} | |
}, | |
"PublicSubnetARouteTableAssociation" : { | |
"Type" : "AWS::EC2::SubnetRouteTableAssociation", | |
"Properties" : { | |
"SubnetId" : { "Ref" : "PublicSubnetA" }, | |
"RouteTableId" : { "Ref" : "PublicRouteTable" } | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment