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

Error in network_profile validation when creating/updating an aks cluster #4108

Closed
pruneau628 opened this issue Aug 16, 2019 · 3 comments · Fixed by #4286
Closed

Error in network_profile validation when creating/updating an aks cluster #4108

pruneau628 opened this issue Aug 16, 2019 · 3 comments · Fixed by #4286

Comments

@pruneau628
Copy link

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 v0.12.6
+ provider.azurerm v1.32.1
+ provider.dns v2.2.0
+ provider.external v1.2.0
+ provider.null v2.1.2

Affected Resource(s)

  • azurerm_kubernetes_cluster.aks.network_profile

Terraform Configuration Files

(Clipped configuration)
resource "azurerm_kubernetes_cluster" "aks" {
  (Clipped configuration)
  network_profile {
    network_plugin     = "azure"
    network_policy     = "calico"
    dns_service_ip     = "10.0.4.10"
    docker_bridge_cidr = "172.17.0.1/16"
    pod_cidr           = "10.0.8.0/21"
    service_cidr       = "10.0.4.0/22"
  }
(Clipped configuration)

Debug Output

Panic Output

Expected Behavior

According to the documentation available today 2019-08-16 (https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html#network_profile) pod_cidr should not be used with network_plugin = "azure", it should fails validation when applying.

Actual Behavior

This attribute is ignored for the first apply, and since it's absent from the state, it triggers a cluster re-creation for nothing.

Steps to Reproduce

  1. terraform apply (works, should not)
  2. terraform apply (attempt to re-create the aks cluster, should not)
(Output clipped)
      ~ network_profile {
            dns_service_ip     = "10.0.4.10"
            docker_bridge_cidr = "172.17.0.1/16"
            load_balancer_sku  = "basic"
            network_plugin     = "azure"
            network_policy     = "calico"
          + pod_cidr           = "10.0.8.0/21" # forces replacement
            service_cidr       = "10.0.4.0/22"
        }
(Output clipped)
Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

Important Factoids

References

  • #0000
@nexxai
Copy link
Contributor

nexxai commented Sep 9, 2019

Submitted PR #4286

@katbyte katbyte added this to the v1.34.0 milestone Sep 13, 2019
@ghost
Copy link

ghost commented Sep 18, 2019

This has been released in version 1.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 = "~> 1.34.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Oct 13, 2019

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 and limited conversation to collaborators Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants