hcloud-talos / terraform-hcloud-talos

This repository contains a Terraform module for creating a Kubernetes cluster with Talos in the Hetzner Cloud.
https://registry.terraform.io/modules/hcloud-talos/talos
MIT License
77 stars 20 forks source link

Support for updating live machines using the talos provider #60

Open Drakonis opened 2 months ago

Drakonis commented 2 months ago

Right now, all provisioned machines use only the configurations assigned to user_data at creation time, any further changes have to be applied through talosctl.

The talos provider appears to provide the ability to apply any modifications to machine configurations in the form of talos_machine_configuration_apply.

mrclrchtr commented 2 months ago

I've been thinking about this for a while, whether it's somehow possible. Unfortunately, we already need the config when creating the server. As far as I know, we can't start it first and then deploy the config.

Maybe we can deploy the same config again after the start. Then we could customize it later.

micheljung commented 2 months ago

Unfortunately, we already need the config when creating the server.

Why?

mrclrchtr commented 2 months ago

As far as I know because of:

user_data          = data.talos_machine_configuration.control_plane[each.value.name].machine_configuration

https://github.com/hcloud-talos/terraform-hcloud-talos/blob/8f33e41afa67e779790e87414c7dd645b650089a/server.tf#L56

But I'm not 100% sure.

Perhaps what Roxedus says here also offers a new possibility for this problem.

I would love to try it out, but at the moment I don't have the time because of other projects.