Skip to content

Commit 2b2f848

Browse files
committed
Add GatewayAttachment and PublicRoute
1 parent c3bdecf commit 2b2f848

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

cloud-formation/ecs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,24 @@ Resources:
8181
CpuArchitecture: X86_64
8282
OperatingSystemFamily: LINUX
8383
TaskRoleArn: !Ref TaskRole
84+
GatewayAttachment:
85+
Type: 'AWS::EC2::VPCGatewayAttachment'
86+
Properties:
87+
InternetGatewayId: !Ref InternetGateway
88+
VpcId: !Ref Vpc
89+
PublicRoute:
90+
Type: 'AWS::EC2::Route'
91+
DependsOn: GatewayAttachment
92+
Properties:
93+
DestinationCidrBlock: '0.0.0.0/0'
94+
GatewayId: !Ref InternetGateway
95+
RouteTableId: !Ref PublicRouteTable
96+
PublicRouteTable:
97+
Type: 'AWS::EC2::RouteTable'
98+
Properties:
99+
VpcId: !Ref Vpc
100+
PublicSubnetRouteTableAssociation:
101+
Type: 'AWS::EC2::SubnetRouteTableAssociation'
102+
Properties:
103+
RouteTableId: !Ref PublicRouteTable
104+
SubnetId: !Ref PublicSubnet

0 commit comments

Comments
 (0)