https://pulumi.com logo
Title
g

great-sunset-355

04/20/2022, 9:56 AM
Do I understand correctly that Dynamic Providers can only handle 1 resource and in order to have multiple resources I should write a normal provider? (https://github.com/pulumi/pulumi-provider-boilerplate)
e

echoing-dinner-19531

04/20/2022, 12:01 PM
Nope you can have multiple resource types supported. The type will be part of the URN passed into the provider methods and you can switch based on that.
g

great-sunset-355

04/20/2022, 12:08 PM
Do you have a more concrete example of this? maybe in TS?
e

echoing-dinner-19531

04/20/2022, 1:06 PM
Ah sorry, I was getting mixed up with the non-dynamic provider interface 😞 looks like URNs aren't passed through to dynamic providers, so you'll have to either write a normal provider or multiple dynamic providers.
g

great-sunset-355

04/20/2022, 1:08 PM
Yup, that's the reason for my question.
e

echoing-dinner-19531

04/20/2022, 1:48 PM
Yeh raise an issue on this. We're planning a lot of work around making providers (both dynamic and real) easier to use and this is a shortcoming of dynamic providers we could fix. At least as part of 4.0.
g

great-sunset-355

04/20/2022, 2:26 PM
something like this makes sense? https://github.com/pulumi/pulumi/issues/9434
e

echoing-dinner-19531

04/20/2022, 3:34 PM
👍 Yup