echoing-breakfast-73834
06/01/2020, 9:23 PMComponentResource
have to be named uniquely for the entire stack (as in different for all instances of a given ComponentResource
) or just unique within each ComponentResource
instance? In other words, if I have a structure like this:
| ParentResource
|- ChildResource
Can I instantiate two instances named like this where both ChildResources have a locally but not globally unique name:
| A-ParentResource
|- B-ChildResource
| B-ParentResource
|- B-ChildResource
Or do I have to do something like this where each ChildResource has a locally and globally unique name:
| A-ParentResource
|- B-ChildResource
| B-ParentResource
|- C-ChildResource
able-beard-29160
06/01/2020, 9:33 PMResources constructed as children of a component should make sure that their names will be unique across multiple instances of the component. In general, the name of the component instance itself (the name parameter passed in to the component constructor) shoud be used as part of the name of the child resources.
https://www.pulumi.com/docs/intro/concepts/programming-model/#resource-arguments
(scroll up a bit)