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 during AKS update #6350

Closed
jnehlt opened this issue Apr 3, 2020 · 3 comments
Closed

Error during AKS update #6350

jnehlt opened this issue Apr 3, 2020 · 3 comments
Labels
bug duplicate service/kubernetes-cluster upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Milestone

Comments

@jnehlt
Copy link

jnehlt commented Apr 3, 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 v0.12.24
+ provider.azuread v0.8.0
+ provider.azurerm v2.3.0
+ provider.helm v1.1.1
+ provider.kubernetes v1.11.1
+ provider.local v1.4.0
+ provider.random v2.2.1
+ provider.tls v2.1.1

Affected Resource(s)

  • azurerm_kubernetes_cluster [DATASOURCE]

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "aks" {
  name                = local.aks_name
  location            = local.aks_location
  dns_prefix          = local.aks_dns_prefix
  resource_group_name = azurerm_resource_group.resource_group.name
  node_resource_group = "${azurerm_resource_group.resource_group.name}-node-rg"

  lifecycle {
    ignore_changes = [
      kubernetes_version,
      default_node_pool.0.node_count
    ]
  }

  service_principal {
    client_id     = data.azurerm_key_vault_secret.aks_client_id.value
    client_secret = data.azurerm_key_vault_secret.aks_client_secret.value
  }

  tags                 = local.aks_tags
  private_link_enabled = var.aks_private_link_enabled

  network_profile {
    network_plugin = "kubenet"
  }

  default_node_pool {
    name                = local.aks_node_pool_name
    vm_size             = var.aks_vm_size
    enable_auto_scaling = var.aks_enable_auto_scaling
    max_pods            = var.aks_max_pods
    vnet_subnet_id      = data.azurerm_subnet.subnet.id
    max_count           = var.aks_nodes_max_count
    min_count           = var.aks_nodes_min_count
    node_count          = var.aks_nodes_node_count
    tags                = var.global_tags
  }

  linux_profile {
    admin_username = local.aks_admin_username
    ssh_key {
      key_data = tls_private_key.ssh.public_key_openssh
    }
  }
}

Debug Output

Not Needed

Panic Output

Not Needed

Expected Behavior

Resource Update

Actual Behavior

ERROR:

Error: Error updating Default Node Pool "devops-sb-dev" (Resource Group "devops-sb-dev-resource_group"): containerservice.AgentPoolsClient#CreateOrUpdate: Invalid input: autorest/validation: validation failed: parameter=parameters.ManagedClusterAgentPoolProfileProperties.Count constraint=Null value=(*int32)(nil) details: value can not be null; required parameter

  on aks/kubernetes.tf line 1, in resource "azurerm_kubernetes_cluster" "aks":
   1: resource "azurerm_kubernetes_cluster" "aks" {

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. CHANGE Something that will NOT force resource recreation (eg. tags)
  4. terraform apply

Important Factoids

References

@tombuildsstuff
Copy link
Contributor

Fixed via #6095

@tombuildsstuff tombuildsstuff added this to the v2.5.0 milestone Apr 6, 2020
@ghost
Copy link

ghost commented Apr 9, 2020

This has been released in version 2.5.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.5.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented May 6, 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 and limited conversation to collaborators May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug duplicate service/kubernetes-cluster upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants