From d796e8f54fc1307035d86d38aa343343cd4eeec2 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 13 May 2015 17:11:28 -0400 Subject: [PATCH] Tell me what the igw id is if we created an igw. --- cloud/amazon/ec2_vpc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cloud/amazon/ec2_vpc.py b/cloud/amazon/ec2_vpc.py index 0870c14ec59..087b13ab15e 100644 --- a/cloud/amazon/ec2_vpc.py +++ b/cloud/amazon/ec2_vpc.py @@ -182,6 +182,17 @@ def get_vpc_info(vpc): 'state': vpc.state, }) +def get_igw_info(igw): + """ + Get info about the internet gateway. + """ + if igw is None: + return {} + + return ({ + 'id': igw.id, + }) + def find_vpc(module, vpc_conn, vpc_id=None, cidr=None): """ Finds a VPC that matches a specific id or cidr + tags