Skip to content

undrainable_node_behavior validation fails when set to null #760

@skooNI

Description

@skooNI

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

brownfield

Terraform Version

1.9.8

Module Version

11.6.0

AzureRM Provider Version

4.68.0

Affected Resource(s)/Data Source(s)

N/A

Terraform Configuration Files

Set `upgrade_settings.undrainable_node_behavior = null`

tfvars variables values

N/A

Debug Output/Panic Output

╷
│ Error: Invalid function argument
│ 
│   on .terraform/modules/aks/extra_node_pool.tf line 183, in resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy":
│  183:       condition     = each.value.upgrade_settings == null || try(each.value.upgrade_settings.undrainable_node_behavior, null) == null || contains(["Cordon", "Schedule"], try(each.value.upgrade_settings.undrainable_node_behavior, ""))
│     ├────────────────
│     │ while calling contains(list, value)
│     │ each.value.upgrade_settings.undrainable_node_behavior is null
│ 
│ Invalid value for "value" parameter: argument must not be null.
╵

Expected Behaviour

terraform plan succeeds

Actual Behaviour

Error above

Steps to Reproduce

Run terraform plan when upgrade_settings.undrainable_node_behavior = null

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