From 0320411d036f52e506e009eebb9959fcabec921a Mon Sep 17 00:00:00 2001 From: Jon Hadfield Date: Sat, 2 Jan 2016 11:16:46 +0000 Subject: [PATCH] return allocation id for vpc address. --- cloud/amazon/ec2_eip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/amazon/ec2_eip.py b/cloud/amazon/ec2_eip.py index 69d762c8c08..32daaf4bcf7 100644 --- a/cloud/amazon/ec2_eip.py +++ b/cloud/amazon/ec2_eip.py @@ -279,7 +279,7 @@ def ensure_present(ec2, domain, address, device_id, changed = changed or assoc_result['changed'] - return {'changed': changed, 'public_ip': address.public_ip} + return {'changed': changed, 'public_ip': address.public_ip, 'allocation_id': address.allocation_id} def ensure_absent(ec2, domain, address, device_id, check_mode, isinstance=True): @@ -355,7 +355,7 @@ def main(): module.check_mode, isinstance=is_instance) else: address = allocate_address(ec2, domain, reuse_existing_ip_allowed) - result = {'changed': True, 'public_ip': address.public_ip} + result = {'changed': True, 'public_ip': address.public_ip, 'allocation_id': address.allocation_id} else: if device_id: disassociated = ensure_absent(ec2, domain, address, device_id, module.check_mode, isinstance=is_instance)