https://pulumi.com logo
l

limited-mouse-98047

07/15/2021, 1:49 PM
Is deleting custom resources special in any way? I noticed that If I try to delete one that has children,
--target-dependents
has no effect. I must be missing something here.
b

bored-oyster-3147

07/15/2021, 1:52 PM
did you mean component resources? Are your child resources setting
parent = this
everywhere?
l

limited-mouse-98047

07/15/2021, 1:53 PM
Yes, extending
pulumi.ComponentResource
, and setting {parent: this} on the child resources. Should this also include a dependsOn as well?
b

bored-oyster-3147

07/15/2021, 1:56 PM
Hmmm I think it's worth a try. I know pulumi has 2 different concepts of their resource graph. There is a parent/child graph (for display purposes) and a dependency graph (for provisioning purposes). Which is necessary so that a resource can depend on multiple other resoruces. So if
--target-dependents
works only on the latter graph than it might make sense that it isn't recognizing the dependents of your
pulumi.ComponentResource
. A
dependsOn
would add that explicit dependency
l

limited-mouse-98047

07/15/2021, 2:06 PM
Okay, that would still align with my mental model of how this works. Will give that a shot.