Hi, is it possible to create dependency between 2 ...
# general
l
Hi, is it possible to create dependency between 2 components? I've created 2 components and want to wait until all the resources of compontent #1 are created before creating component #2. I can't get it to work. When Pulumi runs I get an error from component #2 complaining about nil pointer (probably ref to resource from component #1 which is not available yet). I'm actually using outputs from component #1 as input in component #2 so the dependsOn should not be needes, still, that doesn't seem to work either
t
Whatever you need from the second component probably needs to be an output and then you can utilize that output (maybe in an apply depending on what you're doing)
By component do you mean Pulumi component resource or just a provider like an ec2 instance etc
l
a Pulumi component resource yes.
t
So my understanding is you'd need whatever thing you're depending on to be a component output. Then Pulumi can work out the dependency and build a correct execution plan
l
is there such thing as a "component output". I treat it now as a resource in de dependsOn option. I assumed that would work
t
l
ow wait, now that I check i see that I indeed forgot to register the compontent (where I pass a Go construct with outputs).
I think you gave me a good pointer. thanks
t
No sweat. Good luck!
pulumipus chill hoodie