This message was deleted.
# general
s
This message was deleted.
w
By children, I assume you mean the resources being declared in the component resource class you are defining. If so, I think what you are looking for is that you want to add
{parent: this}
to those resources being declared in the class. For example:
Copy code
this.vpc = new aws.ec2.Vpc(name, {
            cidrBlock: args.cidrBlock,
            enableDnsHostnames: true,
            tags: { ...args.tags },
        }, { parent: this })
p
Yes, I’ve correctly setting the parent: this
But does that mean that the dependsOn is inferred down the tree?
w
I’m not sure I’m understanding the question. If you mean resources that are dependent on the component resource (either implicitly or explicitly), then I would say the answer is yes. Are you seeing some other behavior?
p
So I have a class based on ComponentResource, if when I instantiate the class I specify a
Copy code
dependsOn: someOtherResource
will all children of my class (as declared by parent: this) also wait for “someOtherResource” to be ready
I’m trying to debug some bizarre behaviour where something seems to be causing the whole dependency tree to misbehave so just need to check my assertions are right 😂
w
Yes it should work the way you are assuming.
p
Perfect, thank you