Commit 26c24915 by Atlas Health

Stopped instances can also be terminated

parent ed7e1721
......@@ -990,7 +990,7 @@ def terminate_instances(module, ec2, instance_ids):
terminated_instance_ids = []
for res in ec2.get_all_instances(instance_ids):
for inst in res.instances:
if inst.state == 'running':
if inst.state == 'running' or inst.state == 'stopped':
terminated_instance_ids.append(inst.id)
instance_dict_array.append(get_instance_info(inst))
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment