Skip to content

Allow setting undrainable_node_behavior in upgrade #719

@shanepikeCN

Description

@shanepikeCN

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

brownfield

Terraform Version

1.14.1

Module Version

11.0

AzureRM Provider Version

4.48.0

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster, azurerm_kubernetes_cluster_node_pool

Terraform Configuration Files

module "aks" {


  # ... other required variables ...

  undrainable_node_behavior = "Cordon"
}

tfvars variables values

N/A

Debug Output/Panic Output

# module.cluster.module.aks.azurerm_kubernetes_cluster.main must be replaced
+/- resource "azurerm_kubernetes_cluster" "main" {
          ......
          ~ upgrade_settings {
              - drain_timeout_in_minutes      = 0 -> null
              - undrainable_node_behavior     = "Cordon" -> null # forces replacement
                # (2 unchanged attributes hidden)
            }
        }
    }

Expected Behaviour

Terraform attempts to set the undrainable_node_behavior to null for the cluster and node pool upgrade settings because this setting is not supported by the module.

Changing this setting will force the recreation of the cluster even if nothing has actually changed.

Actual Behaviour

Module should support the passing of this variable undrainable_node_behavior to prevent it trying to recreate the cluster or node pools.

Steps to Reproduce

Upgrade the AKS module to 11.0 and run a terraform apply for an existing module.

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions