https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

05/29/2019, 8:23 PM
Can you nest a
pulumi.ComponentResource
within another
pulumi.ComponentResource
? If so, should all ComponentResouces take a
pulumi.ComponentResourceOptions
map?
Further, which resource should pass in
{parent: this}
?
w

white-balloon-205

05/29/2019, 10:37 PM
Yes - a Component can have a child which is a Component. The resource options are generally inherited from the parent if not overridden in a child, and this inheritance works through both components and custom resources. At each layer, a component should pass
{parent: this}
on any resources it creates to ensure they are parented to it. Those chid resources could be components or custom resources.
f

full-dress-10026

05/29/2019, 10:56 PM
Got it. Thanks.
6 Views