Skip to content

Instantly share code, notes, and snippets.

@eulersson
Created February 19, 2019 23:59
Show Gist options
  • Save eulersson/73b668737e3ecb5482fc04323d85e942 to your computer and use it in GitHub Desktop.
Save eulersson/73b668737e3ecb5482fc04323d85e942 to your computer and use it in GitHub Desktop.
NatElasticIP:
Type: AWS::EC2::EIP
NatGateway:
Type: AWS::EC2::NatGateway
Properties:
AllocationId: !GetAtt NatElasticIP.AllocationId
SubnetId: !Ref PublicSubnetOne
PrivateRouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC
PrivateRoute:
Type: AWS::EC2::Route
Properties:
RouteTableId: !Ref PrivateRouteTable
DestinationCidrBlock: 0.0.0.0/0
NatGatewayId: !Ref NatGateway
PrivateSubnetRouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref PrivateRouteTable
SubnetId: !Ref PrivateSubnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment