Merge pull request #8022 from psa/vpc-gateway-peering

Fix for #7368 breaks peering connections. Unreak them.
pull/4420/head
James Cammarata 2014-07-05 00:08:04 -05:00
commit 1f813ba128
1 changed files with 3 additions and 1 deletions

View File

@ -427,8 +427,10 @@ def create_vpc(module, vpc_conn):
'(igw) route, but you have no Internet Gateway'
)
route_kwargs['gateway_id'] = igw.id
else:
elif route['gw'].startswith('i-'):
route_kwargs['instance_id'] = route['gw']
else:
route_kwargs['gateway_id'] = route['gw']
vpc_conn.create_route(new_rt.id, route['dest'], **route_kwargs)
# Associate with subnets