siderolabs / terraform-provider-talos

Mozilla Public License 2.0
118 stars 15 forks source link

composing configuration? #3

Closed flokli closed 2 years ago

flokli commented 2 years ago

When deploying to different node types, I have a slightly different machine configuration. Right now, talos_machine_configuration seems to only expose control_plane_machine_configuration and worker_machine_configuration, without a way to further customize this through the provider.

I might want to describe a custom partitioning, or node labels for a subset of machines, and juggling with the generated config inside terraform is messy.

What do you think about splitting the talos_machine_configuration resource into different components, one to create the base config/key material (clusterName, clusterEndpoint, k8s version+key material), and another one to render machine config, accepting all the config patches?

This might require some changes in github.com/talos-systems/talos/cmd/talosctl/cmd/mgmt, as mgmt.GenV1Alpha1Config doesn't seem to properly decouple this right now.

andrewrynhard commented 2 years ago

Absolutely agree. This is a TODO in the README but I can use this issue instead. This is an important feature.