From 97b3e8c6e4c3ecd61e27ae604b8d1b0cb7b48ffd Mon Sep 17 00:00:00 2001 From: Paul Armstrong Date: Wed, 2 Jul 2014 23:13:29 +0000 Subject: [PATCH] Fix for #7368 breaks peering connections. Unreak them. --- library/cloud/ec2_vpc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/cloud/ec2_vpc b/library/cloud/ec2_vpc index 5383f3892c0..12aa84ebcf3 100644 --- a/library/cloud/ec2_vpc +++ b/library/cloud/ec2_vpc @@ -422,8 +422,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