siderolabs / terraform-provider-talos

Mozilla Public License 2.0
117 stars 15 forks source link

Specify installer image for the `talos_machine_configuration_apply` #134

Closed mircea-pavel-anton closed 6 months ago

mircea-pavel-anton commented 9 months ago

Given that the current workflow requires users to specify a custom installer image, I think it would be better to have a dedicated field in the talos_machine_configuration_apply to specify an installer image, that way it can also be taken into account during upgrades, since, as far as I can tell from some minimal testing, there is no clear way to specify an installer image for upgrades so that system extensions are taken into account.

smira commented 6 months ago

TF provider doesn't support upgrades at the moment.

maykopetersen commented 2 months ago

You can set up the config_patches argument in talos_machine_configuration_apply like this:

resource "talos_machine_configuration_apply" "example" {
...
  config_patches = [
    yamlencode({
      machine = {
        install = {
          image = "factory.talos.dev/installer/<image_id>:v1.7.4"
        }
      }
    })
  ]
}

Remember: custom installer image is a key of configuration YAML file used by Talos. So, you can use config_patches argument to solve it.