diff options
-rw-r--r-- | cloud/amazon/ec2_eip.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cloud/amazon/ec2_eip.py b/cloud/amazon/ec2_eip.py index 4fb7c2ae..83473044 100644 --- a/cloud/amazon/ec2_eip.py +++ b/cloud/amazon/ec2_eip.py @@ -376,6 +376,8 @@ def main(): if device_id and device_id.startswith('i-'): is_instance = True elif device_id: + if device_id.startswith('eni-') and not in_vpc: + module.fail_json(msg="If you are specifying an ENI, in_vpc must be true") is_instance = False try: |