Hello, i am implementing my first dynamic Resource...
# typescript
Hello, i am implementing my first dynamic Resource. It looks to me that the type of any dynamic resource is hard coded to :
. This generate duplicate resouce URN when the name of 2 different resource are the same . Is there a way to fix this ?
You should subclass that, and pass in your own type string as the 2nd parameter to the constructor
i am not sure which class to subclass, do you have a short example @little-cartoon-10569
I can't find one in the examples repo. Here's one from the docs: https://www.pulumi.com/docs/intro/concepts/resources/#authoring-a-new-component-resource
It's a single-line example, but that's because it really is that simple...
That example is for a component resource, but the same applies to resources created by dynamic providers. E.g.; https://www.pulumi.com/docs/intro/concepts/resources/#dynamic-resource-inputs
class is subclassed, and the 2nd parameter (name) is where the type info goes (line 301). Not sure why it was done this way, instead of with a type and name like in component resources...
that's awesome!!! thks @little-cartoon-10569
👍 1