Fail if specifying an ENI as device but in_vpc is not true

This commit is contained in:
Rob White 2016-11-30 11:58:58 +11:00 committed by Matt Clay
parent b49aa70c29
commit 3f81a65e53

View file

@ -382,6 +382,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: