siderolabs / terraform-provider-talos

Mozilla Public License 2.0
117 stars 15 forks source link

Impossible to configure `machine.nodeTaints` #149

Closed braska closed 6 months ago

braska commented 7 months ago

I have following talos_machine_configuration:

data "talos_machine_configuration" "rpi4" {
  cluster_name     = "home"
  machine_type     = "controlplane"
  cluster_endpoint = "https://${local.api_server_host}:${local.api_server_port}"
  kubernetes_version = "1.29.0"
  talos_version = "v1.6"
  machine_secrets = talos_machine_secrets.this.machine_secrets
  config_patches = [
    yamlencode({
      machine: {
        nodeTaints: {
          "node.cilium.io/agent-not-ready": "true:NoExecute"
        }
        # .... more
      }
      # ... more
    })
  ]
}

While applying it, I got this error:

talos_machine_configuration_apply.rpi4-node1: Creating...
╷
│ Error: Error applying configuration
│ 
│   with talos_machine_configuration_apply.rpi4-node1,
│   on talos.tf line 132, in resource "talos_machine_configuration_apply" "rpi4-node1":
│  132: resource "talos_machine_configuration_apply" "rpi4-node1" {
│ 
│ rpc error: code = InvalidArgument desc = unknown keys found during decoding:
│ machine:
│     nodeTaints:
│         node.cilium.io/agent-not-ready: true:NoExecute

I use version v0.4.0 of Terraform provider. I also tried v0.3.0. It is expected to fail since it was using 1.5.2 of Talos SDK, but v0.4.0 shouldn't fail (it using version 1.6.0 of Talos SDK which already support nodeTaints).

smira commented 6 months ago

This error is coming from Talos, so I'd guess you're trying to apply it Talos < 1.6.0

braska commented 6 months ago

I double checked and you're right. My bad. Thank you. I accidently downloaded wrong release from this page: https://github.com/siderolabs/talos/releases (1.5.6 was at top)