Fix for #20473 - If there is no instance in the ASG, we initialize an empty array for properties['instances'] (#20475)

This commit is contained in:
Maxime Deravet 2017-02-01 12:29:18 -08:00 committed by Ryan Brown
parent 86db15b105
commit 0d2d25b515

View file

@ -306,6 +306,8 @@ def get_properties(autoscaling_group):
properties['terminating_instances'] += 1
if i.lifecycle_state == 'Pending':
properties['pending_instances'] += 1
else:
properties['instances'] = []
properties['instance_facts'] = instance_facts
properties['load_balancers'] = autoscaling_group.load_balancers