Is there any way to get an explicit reference to a...
# general
f
Is there any way to get an explicit reference to a default provider instance inside a Pulumi program?
p
I haven’t found anything in the docs explicitly but I managed to get default provider (although I tested it on my custom ComponentResource where provider was overridden using
opts
):
Copy code
gcp_provider = cast(gcp.Provider, self.get_provider("gcp::"))
that’s a python example so this
cast
is only to satisfy
mypy
f
That's handy inside a resource, but I haven't been able to track down how to grab a default provider from the top-level of a Pulumi program. Anybody else have any thoughts on this?