Skip to content

Commit

Permalink
Fix bug when allocating an EIP with in_vpc not set
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Sep 24, 2021
1 parent 78fc2db commit 0091444
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/modules/ec2_eip.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,11 @@ def address_is_associated_with_device(ec2, module, address, device_id, is_instan

def allocate_address(ec2, module, domain, reuse_existing_ip_allowed, check_mode, tag_dict=None, public_ipv4_pool=None):
""" Allocate a new elastic IP address (when needed) and return it """
if not domain:
domain = 'standard'

if reuse_existing_ip_allowed:
filters = []
if not domain:
domain = 'standard'
filters.append({'Name': 'domain', "Values": [domain]})

if tag_dict is not None:
Expand Down

0 comments on commit 0091444

Please sign in to comment.