https://pulumi.com logo
Title
d

damp-honey-93158

05/23/2022, 1:36 PM
Can anyone explain the difference between the dependency between objects created by using Output<> params, and the Parent? I've noticed that the Parent (via ComponentResourceOptions) impacts the resource graph in the pulumi service, but apart from that does using Parent confer some other benefit? For example, I have a key vault, then I create a key - I can choose not to set the Parent for the key - this doesn't seem to affect destroy operations at all.
g

great-sunset-355

05/23/2022, 1:49 PM
Resource graph is the main feature of it. But also it should inherit providers https://www.pulumi.com/docs/intro/concepts/resources/options/parent/
👍 2
o

orange-policeman-59119

05/23/2022, 5:50 PM
Inheriting other resource options such as provider/providers is the primary reason to use
parent
. Unless you're creating a ComponentResource you generally do not need to set a parent. The other reason to use
parent
, closely tied to component resources, is that logical names are unique at the "URN" level, and setting the
parent
resource option modifies the resource's URN to include the parent's URN.