Fixed ec2_eip.py when assigning a standard elastic IP. (#19238)
This commit is contained in:
parent
e0d4050612
commit
fcb1a2b6cc
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ def ensure_present(ec2, module, domain, address, private_ip_address, device_id,
|
|||
if isinstance:
|
||||
instance = find_device(ec2, module, device_id)
|
||||
if reuse_existing_ip_allowed:
|
||||
if len(instance.vpc_id) > 0 and domain is None:
|
||||
if instance.vpc_id and len(instance.vpc_id) > 0 and domain is None:
|
||||
raise EIPException("You must set 'in_vpc' to true to associate an instance with an existing ip in a vpc")
|
||||
# Associate address object (provided or allocated) with instance
|
||||
assoc_result = associate_ip_and_device(ec2, address, private_ip_address, device_id,
|
||||
|
|
Loading…
Reference in a new issue