https://pulumi.com logo
#golang
Title
# golang
b

busy-room-61756

12/20/2022, 3:24 PM
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

billowy-army-68599

12/20/2022, 3:27 PM
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

busy-room-61756

12/20/2022, 3:32 PM
👍 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

ancient-policeman-24615

12/21/2022, 11:10 AM
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

busy-room-61756

12/21/2022, 11:39 AM
Thanks @ancient-policeman-24615 I’ll watch that issue
2 Views