This message was deleted.
# aws
s
This message was deleted.
l
Is a child resource necessarily dependent on the parent resource? Maybe add an explicit dependsOn and see if that helps?
If there's no property in the child resource that refers back to a property of the parent resource, then maybe
--target-dependents
won't notice...
1
r
A child isn’t a “dependent” technically. “dependent” relationships are defined by
dependsOn
and would be destroyed by
--target-dependents
. Parent-child relationships are defined by the
parent
property and/or
componentResources
I do find it odd though, the docs for
--target
say
Copy code
All resources necessary to destroy this target will also be destroyed.
I would expect that to mean that it would destroy the child.
I expect @little-cartoon-10569 is right on the money here though as to why that happens
q
Thanks @little-cartoon-10569 @red-match-15116 - for now I think easiest solution is to define each resource individually with its own
--target
flag. Thanks for the help
l
I guess you don't have too many resources 🙂 A dependsOn added to the opts of everything that has a parent opt would be first choice! 🙂
👍 1
r
This issue covers what we’ve discussed: https://github.com/pulumi/pulumi/issues/5870 - feel free to upvote/comment as that helps with prioritizing