Update ec2_asg.py
This commit is contained in:
parent
79e253053a
commit
2c24d0482b
1 changed files with 3 additions and 2 deletions
|
@ -255,9 +255,10 @@ def get_properties(autoscaling_group):
|
|||
properties['viable_instances'] = 0
|
||||
properties['terminating_instances'] = 0
|
||||
|
||||
instance_facts = {}
|
||||
|
||||
if autoscaling_group.instances:
|
||||
properties['instances'] = [i.instance_id for i in autoscaling_group.instances]
|
||||
instance_facts = {}
|
||||
for i in autoscaling_group.instances:
|
||||
instance_facts[i.instance_id] = {'health_status': i.health_status,
|
||||
'lifecycle_state': i.lifecycle_state,
|
||||
|
@ -274,7 +275,7 @@ def get_properties(autoscaling_group):
|
|||
properties['terminating_instances'] += 1
|
||||
if i.lifecycle_state == 'Pending':
|
||||
properties['pending_instances'] += 1
|
||||
properties['instance_facts'] = instance_facts
|
||||
properties['instance_facts'] = instance_facts
|
||||
properties['load_balancers'] = autoscaling_group.load_balancers
|
||||
|
||||
if getattr(autoscaling_group, "tags", None):
|
||||
|
|
Loading…
Reference in a new issue