Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion library/cloud/ec2_vpc
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ def create_vpc(module, vpc_conn):
'(igw) route, but you have no Internet Gateway'
)
r_gateway = igw.id
vpc_conn.create_route(new_rt.id, route['dest'], r_gateway)
if r_gateway[:3] == 'igw':
vpc_conn.create_route(new_rt.id, route['dest'], gateway_id=r_gateway)
else:
vpc_conn.create_route(new_rt.id, route['dest'], instance_id=r_gateway)

# Associate with subnets
for sn in rt['subnets']:
Expand Down