happy-area-89552
04/17/2025, 12:49 PMtalos_cluster_secrets = talos.machine.Secrets(
"machine_secrets",
talos_version=talos_version,
opts=resource_opts,
)
talos.machine.get_configuration_output(
machine_type="controlplane",
talos_version=talos_version,
cluster_name=name,
cluster_endpoint="<https://cluster.local:6443>",
kubernetes_version=kubernetes_version,
machine_secrets=talos_cluster_secrets.machine_secrets,
opts=invoke_opts,
)
but I am getting this error
Exception: invoke of talos:machine/getConfiguration:getConfiguration failed: invocation of talos:machine/getConfiguration:getConfiguration returned an error: [AttributeName("machine_secrets").AttributeName("certs").AttributeName("k8s_aggregator")] Missing Configuration for Required Attribute: Must set a configuration value for the machine_secrets.certs.k8s_aggregator attribute as the provider has marked it as required.
the attributes that are referred to in the error (.certs.k8s_aggregator) are different from time to time but I cant get it to work. I can print out the values fine with
talos_cluster_secrets.machine_secrets.apply(lambda s: print(s.certs.k8s_aggregator))
But still getting the error. Any help is very much appreciated 🙂echoing-dinner-19531
04/17/2025, 1:01 PMhappy-area-89552
04/17/2025, 1:02 PMechoing-dinner-19531
04/17/2025, 1:09 PMhappy-area-89552
04/17/2025, 1:09 PM❯ pulumi preview
Previewing update (production):
Type Name Plan Info
pulumi:pulumi:Stack myidm-hcloud-production 1 error
Diagnostics:
pulumi:pulumi:Stack (myidm-hcloud-production):
error: Program failed with an unhandled exception:
Traceback (most recent call last):
File "/usr/bin/pulumi-language-python-exec", line 232, in <module>
loop.run_until_complete(coro)
File "/home/roland/.pyenv/versions/3.12.7/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 143, in run_in_stack
await run_pulumi_func(run)
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 55, in run_pulumi_func
await wait_for_rpcs()
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 119, in wait_for_rpcs
await task
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 155, in do_invoke_output
invoke_result = await _invoke(
^^^^^^^^^^^^^^
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 367, in wait_for_fut
return await asyncio.ensure_future(do_rpc())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/roland/development/iDM/plm_myidm_global/pulumi/hcloud/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 363, in do_rpc
raise error
Exception: invoke of talos:machine/getConfiguration:getConfiguration failed: invocation of talos:machine/getConfiguration:getConfiguration returned an error: [AttributeName("machine_secrets").AttributeName("certs").AttributeName("k8s_aggregator")] Missing Configuration for Required Attribute: Must set a configuration value for the machine_secrets.certs.k8s_aggregator attribute as the provider has marked it as required.
Refer to the provider documentation or contact the provider developers for additional information about configurable attributes that are required.
tried different variations with applys but always a similar errrorechoing-dinner-19531
04/17/2025, 1:09 PMechoing-dinner-19531
04/17/2025, 1:09 PMup
echoing-dinner-19531
04/17/2025, 1:10 PMechoing-dinner-19531
04/17/2025, 1:10 PMhappy-area-89552
04/17/2025, 1:11 PMhappy-area-89552
04/17/2025, 1:11 PMechoing-dinner-19531
04/17/2025, 1:17 PMhappy-area-89552
04/17/2025, 1:18 PMechoing-dinner-19531
04/17/2025, 1:20 PMechoing-dinner-19531
04/17/2025, 1:21 PMhappy-area-89552
04/17/2025, 1:26 PMhappy-area-89552
04/17/2025, 1:27 PMSupport passing composite output types as input types downstream
happy-area-89552
04/17/2025, 1:28 PMIn the meantime, instead ofyou can assign each field onclient_configuration=secrets.client_configuration
individually. It's tedious, but it should get you back running.client_configuration
echoing-dinner-19531
04/17/2025, 1:34 PMclient_configuration
to return a new structure of the expected "type" but just copying each field. Given this is python I'm surprised it doesn't just work though with a castechoing-dinner-19531
04/17/2025, 1:35 PMhappy-area-89552
04/17/2025, 1:35 PMhappy-area-89552
04/17/2025, 1:58 PMtalos_cluster_secrets.machine_secrets.apply(lambda ms: talos.machine.get_configuration_output(
...
machine_secrets={
"secrets": {
"bootstrap_token": ms.secrets.bootstrap_token,
..
still gives me:
machine_secrets.secrets.bootstrap_token attribute as the provider has marked it as required.
happy-area-89552
04/17/2025, 3:28 PMtalos_cluster_secrets.machine_secrets.apply(lambda ms: talos.machine.get_configuration_output(
...
machine_secrets={
"secrets": {
"bootstrapToken": ms.secrets.bootstrap_token,
..
(using camelCase for these properties)echoing-dinner-19531
04/17/2025, 4:04 PM