Can anyone explain the difference between the depe...
# general
d
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
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
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.