Skip to content

Commit

Permalink
fix autoscale from zero
Browse files Browse the repository at this point in the history
  • Loading branch information
belokobylskii.i committed Dec 16, 2024
1 parent 1fd03e2 commit 6428e34
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions selectel/resource_selectel_mks_nodegroup_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ func resourceMKSNodegroupV1Create(ctx context.Context, d *schema.ResourceData, m
if v, ok := d.GetOk("enable_autoscale"); ok {
enableAutoscale := v.(bool)
createOpts.EnableAutoscale = &enableAutoscale
}
if v, ok := d.GetOk("autoscale_min_nodes"); ok {
autoscaleMinNodes := v.(int)
// d.GetOk returns false on zero-value.
autoscaleMinNodes := d.Get("autoscale_min_nodes").(int)
createOpts.AutoscaleMinNodes = &autoscaleMinNodes
}
if v, ok := d.GetOk("autoscale_max_nodes"); ok {
Expand Down

0 comments on commit 6428e34

Please sign in to comment.