[cloud] Fix ASG updates when LaunchConfigurationName does not exist for ASG instances
when replacing launch configurations the previous launch config is removed from any instances (#26966)
This commit is contained in:
parent
5b109506c4
commit
d971629062
1 changed files with 1 additions and 1 deletions
|
@ -423,7 +423,7 @@ def get_properties(autoscaling_group, module):
|
|||
for i in autoscaling_group_instances:
|
||||
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
||||
'lifecycle_state': i['LifecycleState'],
|
||||
'launch_config_name': i['LaunchConfigurationName']}
|
||||
'launch_config_name': i.get('LaunchConfigurationName')}
|
||||
if i['HealthStatus'] == 'Healthy' and i['LifecycleState'] == 'InService':
|
||||
properties['viable_instances'] += 1
|
||||
if i['HealthStatus'] == 'Healthy':
|
||||
|
|
Loading…
Reference in a new issue