Fail if specifying an ENI as device but in_vpc is not true
This commit is contained in:
parent
b49aa70c29
commit
3f81a65e53
1 changed files with 2 additions and 0 deletions
|
@ -382,6 +382,8 @@ def main():
|
||||||
if device_id and device_id.startswith('i-'):
|
if device_id and device_id.startswith('i-'):
|
||||||
is_instance = True
|
is_instance = True
|
||||||
elif device_id:
|
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
|
is_instance = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue