Closed artuross closed 1 year ago
OK, it seems like I was doing it incorrectly - I thought that talos_machine_configuration_controlplane
generates only machine
part of the config and apply prepares the final user data file.
I will prepare a PR to clarify this in the documentation.
I'm still encountering this issue on version 0.4.0-alpha.0
of the provider, so I'm using the general talos_machine_configuration
but other than that, almost identical configuration. Every other resource works as expected, I'm connecting to the cluster, etc... running this in a dev environment on Docker for mac, Intel, Talos 1.5.3
.
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# talos_machine_configuration_apply.this[0] will be created
+ resource "talos_machine_configuration_apply" "this" {
+ apply_mode = "auto"
+ client_configuration = {
+ ca_certificate = "some-long-cert"
+ client_certificate = "some-long-cert"
+ client_key = (sensitive value)
}
+ config_patches = [
+ <<-EOT
"machine":
"kubelet":
"extraArgs":
"rotate-server-certificates": true
EOT,
]
+ endpoint = "localhost"
+ id = (known after apply)
+ machine_configuration = (sensitive value)
+ machine_configuration_input = (sensitive value)
+ node = "10.5.0.2"
}
# talos_machine_configuration_apply.this[1] will be created
+ resource "talos_machine_configuration_apply" "this" {
+ apply_mode = "auto"
+ client_configuration = {
+ ca_certificate = "some-long-cert"
+ client_certificate = "some-long-cert"
+ client_key = (sensitive value)
}
+ config_patches = [
+ <<-EOT
"machine":
"kubelet":
"extraArgs":
"rotate-server-certificates": true
EOT,
]
+ endpoint = "localhost"
+ id = (known after apply)
+ machine_configuration = (sensitive value)
+ machine_configuration_input = (sensitive value)
+ node = "10.5.0.3"
}
Not a lot to go on there, but this is the piece I'm configuring:
+ config_patches = [
+ <<-EOT
"machine":
"kubelet":
"extraArgs":
"rotate-server-certificates": true
EOT,
]
it seems you're trying to apply to a cluster created outside terraform. if you did talosctl cluster create
that machine config is applied differently and the TF provider needs to import the cluster secrets manually.
Oh, interesting. Is there a way to create a local Docker-based Talos cluster with Terraform or is that on the roadmap? For example, I know you can create a local kind cluster with Terraform.
no plans as of now, though you can create a cluster with TF and qemu: https://github.com/siderolabs/contrib/tree/main/examples/terraform/advanced
I'm not sure if I'm doing something incorrectly. Basically, I've copied the full example from the docs. The output that I consistently get is below.
Variables
Output
cp_config_apply
andworker_config_apply
are going on forever. I've tested it with varying configurations (I initially assumed the reason was use of FQDN for endpoint).When cancelled, it dumps
however on the config I am trying to prepare for myself, I get a slightly better error message:
I'm using Terraform
v1.3.9
in M1 iMac andv0.1.1
version ofTalos
provider.