Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When min_cound is = to max_count get error Error: max_count must be >= min_count when using azurerm_kubernetes_cluster_node_pool resource #8944

Closed
chrisp787 opened this issue Oct 19, 2020 · 3 comments

Comments

@chrisp787
Copy link

chrisp787 commented Oct 19, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version Terraform v = 0.13.3 azurerm provider v = 2.32.0

Affected Resource(s)

resource "azurerm_kubernetes_cluster_node_pool" "windows" {
count = var.enable_windows_pool ? 1 : 0
name = "win"
kubernetes_cluster_id = azurerm_kubernetes_cluster.gdo-aks.id
os_type = "Windows"
vm_size = var.windows_node_size
enable_auto_scaling = true
min_count = 1
max_count = 1
vnet_subnet_id = azurerm_subnet.aks-sn2.id
}

Actual Behavior

When this runs you will get the error Error: max_count must be >= min_count

As you can see that they are equal so this should run.

When you set the same for the default node_pool in the azurerm_kubernetes_cluster this will work fine.

Steps to Reproduce

In the azurerm_kubernetes_cluster_node_pool set min_count and max_count to teh same value

  1. terraform apply

Important Factoids

I have looked through the code for azurerm_kubernetes_cluster_node_pool and see the following on lines 354 to line 356

	if minCount >= maxCount {
		return fmt.Errorf("`max_count` must be >= `min_count`")
	}

Where as if you view this in the code for the azurerm_kubernetes_cluster resource you will see

            if minCount > maxCount {
		return nil, fmt.Errorf("`max_count` must be >= `min_count`")
	}

Hense it works for the default node pool.

References

  • #0000
@chrisp787 chrisp787 changed the title When min_cound is = to max_count het error Error: max_count must be >= min_count when using azurerm_kubernetes_cluster_node_pool resource When min_cound is = to max_count get error Error: max_count must be >= min_count when using azurerm_kubernetes_cluster_node_pool resource Oct 20, 2020
@mbfrahry mbfrahry modified the milestones: v2.35.0, v2.34.0 Oct 22, 2020
@jackofallops
Copy link
Member

Closing based on merge of 8957

@ghost
Copy link

ghost commented Oct 29, 2020

This has been released in version 2.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.34.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Nov 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants