cope with an ASG instance not having a launch config any more (#57737)
This commit is contained in:
parent
8ac0bbcbf6
commit
d1846b96c0
1 changed files with 2 additions and 2 deletions
|
@ -1497,7 +1497,7 @@ def get_instances_by_launch_config(props, lc_check, initial_instances):
|
|||
# Check if migrating from launch_template to launch_config first
|
||||
if 'launch_template' in props['instance_facts'][i]:
|
||||
old_instances.append(i)
|
||||
elif props['instance_facts'][i]['launch_config_name'] == props['launch_config_name']:
|
||||
elif props['instance_facts'][i].get('launch_config_name') == props['launch_config_name']:
|
||||
new_instances.append(i)
|
||||
else:
|
||||
old_instances.append(i)
|
||||
|
@ -1524,7 +1524,7 @@ def get_instances_by_launch_template(props, lt_check, initial_instances):
|
|||
# Check if migrating from launch_config_name to launch_template_name first
|
||||
if 'launch_config_name' in props['instance_facts'][i]:
|
||||
old_instances.append(i)
|
||||
elif props['instance_facts'][i]['launch_template'] == props['launch_template']:
|
||||
elif props['instance_facts'][i].get('launch_template') == props['launch_template']:
|
||||
new_instances.append(i)
|
||||
else:
|
||||
old_instances.append(i)
|
||||
|
|
Loading…
Reference in a new issue