big-island-38073
08/22/2021, 9:18 PMpulumi up
I see my nested resources in my pulumi cloud resources tab, can I fetch those outputs from the command line?bored-table-20691
08/22/2021, 9:42 PMsteep-sunset-89396
08/23/2021, 12:29 AMbig-island-38073
08/23/2021, 1:21 AMexport const talos0vmid = talos0.vmid
was enough to declare an output,
Also Outputs and resources are clearly not the same.
But this is confusing:
$ pulumi up
Previewing update (dev)
View Live: <https://app.pulumi.com/daneroo/pulumi-pxmx/dev/previews/e0d01581-a834-4b2c-8546-7b7fbe758a72>
Type Name Plan
pulumi:pulumi:Stack pulumi-pxmx-dev
Outputs:
+ talos0vmid: output<string>
+ talos1vmid: output<string>
Resources:
3 unchanged
But also
$ pulumi stack output
Current stack outputs (0):
No output values currently in this stack
steep-sunset-89396
08/23/2021, 1:34 AM{prop1: val1, prop2: val2}
) of the properties I want as outputs.
In your example above, did you run pulumi up
or pulumi preview
? Running pulumi preview
won't alter the state of your stack. You need to let pulumi up
finish in order to get the outputs be exported by the CLI.big-island-38073
08/23/2021, 1:39 AMpulumi up
.steep-sunset-89396
08/23/2021, 1:42 AM.vmid
? What provider are you using by the way ?big-island-38073
08/23/2021, 1:43 AMnetworks
[
{
"bridge": "vmbr0",
"firewall": false,
"linkDown": false,
"macaddr": "9E:28:27:8A:97:0E",
"model": "virtio",
"queues": 0,
"rate": 0,
"tag": -1
}
]
steep-sunset-89396
08/23/2021, 1:50 AMexport const macaddr = talos0.networks[0].macaddr;
.pulumi stack export > stack.json
I found it's also a good way to look into what's usually available.big-island-38073
08/23/2021, 2:08 AMexport const macaddr = talos0.networks[0].macaddr
but that yields this error in VSCode:
Element implicitly has an 'any' type because expression of type '0' can't be used to index type 'Output<QemuVMNetwork[] | undefined>'.
Property '0' does not exist on type 'Output<QemuVMNetwork[] | undefined>'.
Looks like you found the answer though!!!!
$ pulumi stack export | jq -r .deployment.resources[2].outputs.networks[0].macaddr
F2:97:D7:F8:24:C5
$ pulumi stack export | jq -r .deployment.resources[3].outputs.networks[0].macaddr
9E:28:27:8A:97:0E
Bingo!@matchlighter/pulumi-proxmoxve
Which is a wrapper around a terraform provider.
.. I know I am really asking for trouble..steep-sunset-89396
08/23/2021, 2:15 AMbig-island-38073
08/23/2021, 2:22 AM.iso
• Run Talos' bootstrapping code to inject configuration into the two newly created VM's
◦ This is where I need to turn the above mentioned mac address into an IP address
• Export the kubeconfig from the new cluster
• Get on with my life, with a brand new Kubernetes cluster!
• I am assuming from then, I can follow the "normal" kubernetes instructions
Hopefully the DynamicProvider you mentioned above will do the trick!steep-sunset-89396
08/23/2021, 3:33 AM