Skip to content

Commit

Permalink
max_count should be higher or equal to min_count
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Janssens committed Sep 28, 2020
1 parent be8eb65 commit 2257f31
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,10 @@ func resourceArmKubernetesClusterNodePoolCreate(d *schema.ResourceData, meta int
profile.Count = utils.Int32(int32(minCount))
}

if maxCount >= 0 {
if maxCount >= 0 && maxCount >= minCount {
profile.MaxCount = utils.Int32(int32(maxCount))
} else if maxCount < minCount {
return fmt.Errorf("`max_count` must be higher or equal to `min_count`")
} else {
return fmt.Errorf("`max_count` must be configured when `enable_auto_scaling` is set to `true`")
}
Expand Down

0 comments on commit 2257f31

Please sign in to comment.