Skip to content

Instantly share code, notes, and snippets.

@AndrewBestbier
Created March 5, 2020 13:00
Show Gist options
  • Save AndrewBestbier/d0dbd11d20c266979a36ac0e5740da3a to your computer and use it in GitHub Desktop.
Save AndrewBestbier/d0dbd11d20c266979a36ac0e5740da3a to your computer and use it in GitHub Desktop.
PublicRouteTable: # (1)
Type: AWS::EC2::RouteTable # (2)
Properties:
VpcId: !Ref VPC # (3)
PublicRoute: # (4)
Type: AWS::EC2::Route # (5)
DependsOn: AttachGateway
Properties:
RouteTableId: !Ref PublicRouteTable # (6)
DestinationCidrBlock: 0.0.0.0/0 # (7)
GatewayId: !Ref InternetGateway # (8)
PublicSubnetARouteTableAssociation: # (9)
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId: !Ref PublicSubnetA
RouteTableId: !Ref PublicRouteTable
PublicSubnetBRouteTableAssociation: # (10)
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId: !Ref PublicSubnetB
RouteTableId: !Ref PublicRouteTable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment