From dfc21ced6ac5e591203f8530b55f5c76f06d0317 Mon Sep 17 00:00:00 2001 From: Atlas Health Date: Wed, 21 May 2014 07:18:30 -0700 Subject: [PATCH] Stopped instances can also be terminated --- cloud/ec2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/ec2 b/cloud/ec2 index 51773768d87..ac1f4012f4b 100644 --- a/cloud/ec2 +++ b/cloud/ec2 @@ -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: