[cloud] EC2 AutoScaling fix for respecting zero as the desired, min&max size values (#27870)

pull/29940/head
Willem van Ketwich 7 years ago committed by Toshio Kuratomi
parent 69721cade6
commit c072a5406f

@ -942,9 +942,9 @@ def create_autoscaling_group(connection, module):
attach_lb_target_groups(connection, group_name, tgs_to_attach) attach_lb_target_groups(connection, group_name, tgs_to_attach)
# check for attributes that aren't required for updating an existing ASG # check for attributes that aren't required for updating an existing ASG
desired_capacity = desired_capacity or as_group['DesiredCapacity'] desired_capacity = desired_capacity if desired_capacity is not None else as_group['DesiredCapacity']
min_size = min_size or as_group['MinSize'] min_size = min_size if min_size is not None else as_group['MinSize']
max_size = max_size or as_group['MaxSize'] max_size = max_size if max_size is not None else as_group['MaxSize']
launch_config_name = launch_config_name or as_group['LaunchConfigurationName'] launch_config_name = launch_config_name or as_group['LaunchConfigurationName']
launch_configs = describe_launch_configurations(connection, launch_config_name) launch_configs = describe_launch_configurations(connection, launch_config_name)

Loading…
Cancel
Save