worried-queen-6279404/26/2021, 10:05 PM
little-cartoon-1056904/26/2021, 10:31 PM
worried-queen-6279404/26/2021, 11:48 PM
parameter which is just a slash separated string. This would be really flexible. You could even have two separate packages adding resources into the same group.
little-cartoon-1056904/26/2021, 11:58 PM
worried-queen-6279404/27/2021, 12:12 AM
? I was thinking
little-cartoon-1056904/27/2021, 12:12 AM
bored-oyster-314704/27/2021, 1:20 PM
You can still encapsulate the resources in the type that you choose to return from your function.I don't really get this. I mean you're encapsulating them in the sense of OOP but not from the perspective of Pulumi, which IMO is the entire purpose of component resources. If you need to call your function more than once, aren't you doing something to make the URNs unique on each call anyways?
little-cartoon-1056904/27/2021, 6:58 PM
bored-oyster-314704/27/2021, 8:08 PM
worried-queen-6279404/28/2021, 12:07 AM
I mean you're encapsulating them in the sense of OOP but not from the perspective of Pulumi, which IMO is the entire purpose of component resources.How is Pulumi's perspective of encapsulation different to the OOP sense? AFAIK pulumi allows you to import, delete, unprotect, refresh child resources. The child resources are still visible from the outside (in the Pulumi sense). They don't update atomically either so they aren't treated as a single unit. It doesn't seem like they really are encapsulated in the Pulumi sense. I'm not saying that this is a bad thing. I'm just not seeing any additional benefit beyond the OOP reasons for encapsulating resources.
If you need to call your function more than once, aren't you doing something to make the URNs unique on each call anyways?Yes, you would do it just the same as for component resources. But that's my point, component resources isn't making this easier. IMO the names of the children within a component resource should only have to worry about being unique amongst themselves not globally. If the URN of the child was prefixed with the URN of the parent and not just the type of the parent then this would work.
bored-oyster-314704/28/2021, 12:35 AM
worried-queen-6279404/29/2021, 2:27 AM
bored-oyster-314704/29/2021, 1:15 PM
little-cartoon-1056904/29/2021, 8:56 PM
bored-oyster-314704/29/2021, 9:19 PM
worried-queen-6279405/03/2021, 12:55 AM