https://pulumi.com logo
Title
d

damp-honey-93158

10/27/2022, 10:57 AM
general question about dependencies in pulumi - if I have a class derived from ComponentResource, lets call that the "Manager" class - and within the ctor of Manager I instantiate other resources using parent = this - will the stuff I'm instantiating in the ctor of Manager implicitly also depend on the same things that Manager is depending on (assuming its ComponentResourceOptions value has dependencies)?
e

echoing-dinner-19531

10/27/2022, 12:44 PM
I think so, the component won't register and resolve until it's dependencies resolve and the parent properties won't resolve till after that.
d

damp-honey-93158

10/27/2022, 6:01 PM
so I wrote a small pulumi program in csharp to test out the concept - from what I see, the answer is nope - no dependancies from the "parent" are waited on - resources require specific dependsOn attributes to be set in the component resource options instance.
e

echoing-dinner-19531

10/27/2022, 6:53 PM
ah yeh this might vary from language to language based on order of class constructors run, something we know we ought to make more consistent