CloudNationHQ / terraform-azure-aks

Terraform module which creates azure kubernetes resources used by workloads and accelerators.
https://library.tf/modules/CloudNationHQ/aks/azure/latest
MIT License
0 stars 1 forks source link

validation error aks windows cluster networking #73

Closed dkooll closed 2 months ago

dkooll commented 2 months ago

When deploying a windows cluster and specifying the network plugin like

    network_profile = {
      network_plugin = "azure"
    }

the validation should not produce any errors. Instead i get the below:

Error: Invalid value for variable

  on main.tf line 40, in module "aks":
  40:   cluster = {
  41:     name          = module.naming.kubernetes_cluster.name_unique
  42:     location      = module.rg.groups.demo.location
  43:     resourcegroup = module.rg.groups.demo.name
  44:     depends_on    = [module.kv]
  45:     profile       = "windows"
  46:     dns_prefix    = "demo"
  47:     node_pools = {
  48:       cache = {
  49:         vm_size    = "Standard_DS2_v2"
  50:         node_count = 2
  51:         os_type    = "Windows"
  52:       }
  53:     }
  54:     network_profile = {
  55:       network_plugin = "azure"
  56:     }
  57:   }
    ├────────────────
    │ var.cluster is object with 8 attributes

The aks profile must be either 'windows' or 'linux'. If the profile is 'windows', 'var.cluster.network.plugin' must be 'azure'.

This was checked by the validation rule at ../../variables.tf:5,3-13.