alessiodionisi / terraform-provider-k0s

Terraform provider to create and manage k0s Kubernetes clusters, using embedded k0sctl
https://registry.terraform.io/providers/alessiodionisi/k0s
Apache License 2.0
23 stars 8 forks source link

Raw SSH key support, k0sctl.yaml config output, read phase retries #96

Open danielskowronski opened 11 months ago

danielskowronski commented 11 months ago

This is only a draft, but I wanted to let the community know that it's soon to be completed :)

Scope:

It can be tested with https://registry.terraform.io/providers/danielskowronski/k0s/

alessiodionisi commented 11 months ago

Thanks for the PR! I'll do a review within the next week.

danielskowronski commented 11 months ago

It won't be easy to implement https://github.com/alessiodionisi/terraform-provider-k0s/issues/95 as issue seems to reside in k0sctl itself (https://github.com/k0sproject/k0sctl/issues/603) plus some features were added but are not yet released with version number.

I'll try to figure out if some quick fix can be applied, e.g. by setting Reset flag dynamically on Read phase based upon detected need to rebuild the controller. But most likely it'll need to go out of scope of this PR and the relevant issue would wait for k0sctl implementation.

alessiodionisi commented 11 months ago

I prefer to wait k0sctl implementation, can you please rebase the PR? I can't do it because I can't commit to your branch.

danielskowronski commented 10 months ago

I prefer to wait k0sctl implementation

We'll need to wait for https://github.com/k0sproject/k0sctl/issues/603 and I assume it'd "just work". Otherwise, some logic would need to be applied as described previously.

Basically, k0sctl/k0s currently does not provide anything that a typical Terraform provider could use as a source of truth it can read at any given moment - for example, import operation can't be implemented from live cluster without any k0sctl.yaml file.

can you please rebase the PR? I can't do it because I can't commit to your branch.

Done