Changing a resource’s provider forces it to get re...
# general
g
Changing a resource’s provider forces it to get re-created, even if the provider is also another, say, AWS provider…??? 🤔
I guess if the region or something important changes, but it’s a blanket replacement ? hm
Is there a way to programaticallyg et access to the default provider? e.g. the one that configures
aws:profile
aws:region
etc… ?
Copy code
By default, each provider uses its package's global configuration settings, which are controlled by your stack's configuration. You can set information such as your cloud provider credentials with environment variables and configuration files. If you store this data in standard locations, Pulumi knows how to retrieve them.
cool… but, where do I find this information programatically? 😄
it seems like
pulumi_aws.Provider.region
for example just wants to returna future, on an instance of the class, which make sense, but Pulumi must be storing its “instance” of the default provider resource in a resource bag somewhere else. It says it belongs to the resource by default, and since everything is based off of CustomResource, is that what it’s ultimately falling back to?
f
Most of the providers include a
config
module where the provider configuration for the default provider lives, e.g.
aws.config.region