Question regarding the `pulumi-talos` provider (cc...
# pulumiverse
s
Question regarding the
pulumi-talos
provider (cc @limited-rainbow-51650): I'm trying to work around issue #93 by manually assigning the different fields instead of passing a composite output. For example:
Copy code
workerCfg := machine.GetConfigurationOutput(ctx, machine.GetConfigurationOutputArgs{
    // code omitted for brevity
    MachineSecrets: machine.MachineSecretArgs{
        Certs: talosSecrets.MachineSecrets.Certs(),
        Cluster: talosSecrets.MachineSecrets.Cluster(),
        // code omitted for brevity
    },
})
This seems to work fine for machine secrets, but for client configuration not so much (using
client.GetConfigurationClientConfigurationArgs
). Apparently, the type is missing a
ToClientConfigurationOutput
method, according to my IDE's warning and the output of
pulumi up
. Is there a workaround similar to
machine.MachineSecretsArgs
but for client configuration in Go? This issue seems to imply the workaround works in Python.
I think I found the problem. When using
machine.NewConfigurationApply
, even though the field is called
ClientConfiguration
the type is
machine.ClientConfigurationArgs
, which allows you to individually specify the CA certificate, client certificate, and client key. This is true also for
machine.NewBootstrap
. When using
client.GetConfigurationOutput
is when you'd use the type
client.GetConfigurationClientConfigurationArgs
to manually specify the CA certificate, client certificate, and client key. I'm running
pulumi up
right now and will post back here shortly to confirm my workaround.
My cluster still won't bootstrap properly, but I do believe that the original issue in the thread was resolved by using the correct types (that always helps). It's quite difficult to know which types are used where when the docs and examples (which are auto-generated from the code) are incorrect/incomplete. Once I get this running I'll post a blog and correct code to use until the underlying issue is resolved.