Hi - can I create a provider that contains compone...
# golang
b
Hi - can I create a provider that contains components made up from resources in the same provider? The closest I've found so far is this example from pulumi-go-provider, but the components are actually using resources from
pulumi-random
. For now I plan to create two separate providers for my resources and components, but I'm fairly sure I've just missed something obvious and it's easy for them to co-exist. Any pointers gratefully received.
b
no, you’d create a component that includes resources from the provider, not the other way around
a provider talks directly to an API. A component is a grouping of resources
b
👍 ty
I was hoping to make a single distributable (provider?) where Component A creates (groups?) Resource B and Resource C. But looks like I need to put Resource B and Resource C into their own resource provider, then put Component A into its own component provider and distribute both to users. Still learning the ropes!
a
Right now, the best way is to distribute a custom provider with the raw resources, and a component provider for the components. This is a know problem and we are actively working on improving the situation.
@billowy-army-68599 I think that @busy-room-61756 was discussing creating a provider that serves both custom resources and component resources, which should be possible (and is done in the example they referenced).
b
Thanks @ancient-policeman-24615 I’ll watch that issue