I've got a question about when/how I should call r...
# typescript
b
I've got a question about when/how I should call registerOutputs. I'm using the proxmoxve and talos providers, wrapped with our own Pulumi resources for our own logic, so the high level process I have is: • Construct a Talos cluster resource to get the
controlplane
and
worker
configurations. • Construct a series of Proxmox virtual machine resources which use those configurations in the
cloud-init
config for the VMs. • Call the
bootstrap
method on the Talos cluster resource, which finishes setting up the cluster but needs a running VM with a known IP to do so. Technically the cluster isn't 'done', and I can't register all the outputs I might want, until
bootstrap
is finished. But I guess if I don't call
registerOutputs
in the constructor, and the Proxmox VMs have the Talos cluster as a parent, they might never create...
e
But I guess if I don't call
registerOutputs
in the constructor, and the Proxmox VMs have the Talos cluster as a parent, they might never create...
They'll still create before registerOutputs is called
b
Aah
e
So call registerOutputs once you want the component to show up as complete in the UI
b
👍 Thank you
https://www.pulumi.com/docs/iac/concepts/resources/components/#what-registeroutputs-does I have read elsewhere that
registerOutputs
is automatically called (after the constructor completes?) for resources if you haven't already called it. So I don't actually need to call it anywhere explicitly?
e
it's automatically called for custom resources, and I think the nodejs sdk calls it if you use the initalize method, but otherwise for your component resources you'll want to call it