Last active
October 28, 2017 12:08
-
-
Save ksnabb/8fd0d70ab8155ad3fde52ed1089e85eb to your computer and use it in GitHub Desktop.
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
internet_gateway = stack.add_resource( | |
InternetGateway('InternetGateway') | |
) | |
route_table = stack.add_resource(RouteTable( | |
'RouteTable', | |
VpcId=Ref(vpc) | |
)) | |
stack.add_resource(Route( | |
'RouteToInternet', | |
DestinationCidrBlock='0.0.0.0/0', | |
GatewayId=Ref(internet_gateway), | |
RouteTableId=Ref(route_table) | |
)) | |
stack.add_resource( | |
VPCGatewayAttachment( | |
'GatewayAttachment', | |
VpcId=Ref(vpc), | |
InternetGatewayId=Ref(internet_gateway) | |
) | |
) | |
stack.add_resource( | |
SubnetRouteTableAssociation( | |
'PublicSubnetAssociation1', | |
SubnetId=Ref(public_subnet1), | |
RouteTableId=Ref(route_table) | |
) | |
) | |
stack.add_resource( | |
SubnetRouteTableAssociation( | |
'PublicSubnetAssociation2', | |
SubnetId=Ref(public_subnet2), | |
RouteTableId=Ref(route_table) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment