|
|
@ -283,14 +283,16 @@ def delete_autoscaling_group(connection, module):
|
|
|
|
groups = connection.get_all_groups(names=[group_name])
|
|
|
|
groups = connection.get_all_groups(names=[group_name])
|
|
|
|
if groups:
|
|
|
|
if groups:
|
|
|
|
group = groups[0]
|
|
|
|
group = groups[0]
|
|
|
|
group.shutdown_instances()
|
|
|
|
group.max_size = 0
|
|
|
|
|
|
|
|
group.min_size = 0
|
|
|
|
|
|
|
|
group.desired_capacity = 0
|
|
|
|
|
|
|
|
group.update()
|
|
|
|
instances = True
|
|
|
|
instances = True
|
|
|
|
while instances:
|
|
|
|
while instances:
|
|
|
|
groups = connection.get_all_groups()
|
|
|
|
tmp_groups = connection.get_all_groups(names=[group_name])
|
|
|
|
for group in groups:
|
|
|
|
if tmp_groups:
|
|
|
|
if group.name == group_name:
|
|
|
|
tmp_group = tmp_groups[0]
|
|
|
|
if not group.instances:
|
|
|
|
if not tmp_group.instances:
|
|
|
|
instances = False
|
|
|
|
instances = False
|
|
|
|
time.sleep(10)
|
|
|
|
time.sleep(10)
|
|
|
|
|
|
|
|
|
|
|
|