https://pulumi.com logo
#general
Title
# general
c

creamy-monkey-35142

03/14/2024, 1:54 PM
Hi @echoing-dinner-19531 and team, I’m writing (still) Dynamic Resource Provider and I have question. If I have 5 function related to create Users, Project, Database, Settings, Audit which equal to 5 different resource then how many class ResourceProvider I need write? 1 or 5? because of afaik each ResourceProvider will have different create/update/delete function =.=!
e

echoing-dinner-19531

03/14/2024, 2:00 PM
Yeh for dynamic providers you need a provider per resource type. This could be redesigned to not need this, but it would be a breaking overhaul of what dynamic providers look like.
c

creamy-monkey-35142

03/14/2024, 2:04 PM
thank you very much!
h

hundreds-gpu-71155

03/14/2024, 4:10 PM
oh, reading through the docs, I just assumed it was supposed to switch logic based on the type of thing it got
c

creamy-monkey-35142

03/15/2024, 2:27 AM
do you have any example or link to document @hundreds-gpu-71155?
h

hundreds-gpu-71155

03/15/2024, 4:27 PM
just glancing at https://www.pulumi.com/docs/reference/pkg/python/pulumi/#pulumi.dynamic.ResourceProvider and https://www.pulumi.com/docs/concepts/resources/dynamic-providers/, but it looks like
create()
doesn't actually get told what kind of thing it's supposed to be doing
e

echoing-dinner-19531

03/15/2024, 4:34 PM
doesn't actually get told what kind of thing it's supposed to be doing
Yup. These weren't designed with multiple resource types in mind. The provider protocol has enough information on it that it would be doable, but it would pretty much need to be dynamic provider v2 to expose that info.