worried-queen-62794
04/26/2021, 10:05 PMlittle-cartoon-10569
04/26/2021, 10:31 PMworried-queen-62794
04/26/2021, 11:48 PMgroup
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-10569
04/26/2021, 11:58 PMworried-queen-62794
04/27/2021, 12:12 AM<parent-urn>$<resource-type>::<resource-name>
? I was thinking <provider-name>:<provider-unique-resource-id>
would suffice.little-cartoon-10569
04/27/2021, 12:12 AMbored-oyster-3147
04/27/2021, 1:20 PMYou 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-10569
04/27/2021, 6:58 PMbored-oyster-3147
04/27/2021, 8:08 PMworried-queen-62794
04/28/2021, 12:07 AMI 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-3147
04/28/2021, 12:35 AMworried-queen-62794
04/29/2021, 2:27 AMbored-oyster-3147
04/29/2021, 1:15 PMlittle-cartoon-10569
04/29/2021, 8:56 PMbored-oyster-3147
04/29/2021, 9:19 PMworried-queen-62794
05/03/2021, 12:55 AM