Redundancy with Dynamic Resource Providers #15850
Unanswered
dga-nagra
asked this question in
Pulumi Providers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to follow Dynamic resource providers.
I want to define 1 provider that knows the credentials, and multiple resources for this provider.
The current way forces me to create 1 Provider per resource:
When I expected something like:
We can also not use the
opts=pulumi.ResourceOptions(provider=myprovider)
method to select the provider (it misses the "package" attribute) and we are required to give the provider in the__init__
of the resource. Hopefully I can add aprovider
parameter to it.This is not so much of a burden when we can hardcode the provider instantiation in the resource, but when we have multiple resources for multiple providers, this becomes a real pain.
I am wondering why this was made this way and how I could re-use a single provider definition? Can someone explain this and/or provide an alternative to this ?
I see there are some serialization with pickle, so I cannot even send callbacks (or not easily).
Beta Was this translation helpful? Give feedback.
All reactions