terraform-provider-talos icon indicating copy to clipboard operation
terraform-provider-talos copied to clipboard

enhancement: treat talos_version without prefix v as valid version

Open networkhermit opened this issue 1 year ago • 3 comments

Provider version: 0.2.0-beta.0

kubernetes_version and helm chart version both can be specified without the prefix v: 1.27.1, 1.13.2, but when it comes to talos_version, "1.4.0" is treated as invalid, changed to "v1.4.0" fixed that error

resource "talos_machine_secrets" "default" {
  talos_version = "1.4.0"
}
╷
│ Error: Invalid version
│ 
│    1: resource "talos_machine_secrets" "default" {
│ 
│ error parsing version "1.4.0"
╵

networkhermit avatar Apr 20 '23 14:04 networkhermit

this was following the same flow as the cli:

❯ talosctl gen secrets --talos-version 1.2
invalid talos-version: error parsing version "1.2"

frezbo avatar Apr 20 '23 15:04 frezbo

We can probably still fix this in the TF provider, probably before 0.2.0

frezbo avatar Apr 20 '23 15:04 frezbo

We can probably still fix this in the TF provider, probably before 0.2.0

I think it would be better to also fix it in talosctl and perhaps talos sdk.

networkhermit avatar Apr 21 '23 16:04 networkhermit