sparse-intern-71089
07/15/2021, 10:26 AMbored-oyster-3147
07/15/2021, 12:21 PM--target-dependents
bored-oyster-3147
07/15/2021, 12:22 PM--target {urn}
defaults to only deleting the target for safetylimited-mouse-98047
07/15/2021, 1:40 PM--target-dependents
doesn't always work. Is this a matter of explicitly naming dependsOn
perhaps?miniature-leather-70472
07/15/2021, 2:34 PMbored-oyster-3147
07/15/2021, 2:35 PM--target-dependents
should just be a flag you shouldn't need to list your dependents.... are any of your dependents protect: true
maybe?miniature-leather-70472
07/20/2021, 9:34 AM--target-dependents
gives me the same error about child resources, the only way to get Pulumi to delete it is to list every child resource using the --target
property. None of the resources are protectedbored-oyster-3147
07/20/2021, 1:10 PMchildren
is not necessarily the same as dependents
. For instance a ComponentResource
can have many children but those children don't depend on the parent ComponentResource
. Since pulumi effectively has 2 separate resource graphs. The first graph is the parent/child graph, which is the one built from the parent
property and is used mostly for display purposes. Unless otherwise specified, the parent
will default to the stack
the resource belongs to or the provider
that was used to deploy it if one was explicitly provided. The second graph is the dependency graph, which is necessarily separate because a resource can depend on more than 1 resource - so that relationship is many:1 while a parent/child relationship is 1:many. Dependencies, unless explicitly specified via the dependsOn
property, are inferred by all of the Output<T>
instances being passed around.
So if this is by chance a ComponentResource
that you are trying to destroy, then it might be that in order to have the --target-dependents
function as expected you may need to explicitly specify dependsOn: this
on all of the children as well, which will make the children explicitly dependents of the containing ComponentResource
. If what you are trying to delete is not a ComponentResource
, than maybe this understanding will help you spot which of the children doesn't actually depend on the resource you're trying to delete.miniature-leather-70472
07/20/2021, 2:07 PMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by