In the docs at <
# aws
In the docs at it says if multiple profiles are configured,
Copy code
In this case, you will need to set the AWS_PROFILE environment variable to the name of the profile to use.
However, later in the docs, an alternative method is offered:
Copy code
After creating your project, run pulumi config set aws:profile <profilename>
If these differ, which takes precedence, the env var or the config setting? In general will this order of precedence always be true for configuration in Pulumi?
I don't speak golang, so I'm not sure I'm reading this right (, but I think the config setting takes precedence over the env var.
Two things to note though: if you're using the S3 backend, it doesn't use the provider, so aws:profile is ignored. Only the env var affects the backend.
And, this code is used only if you don't provide the
property when creating your AWS provider resource (or if you're using the default provider). It's easy to provide your own value when creating your own provider.
Thanks for all that @little-cartoon-10569.
👍 1