pulumi-aws-native icon indicating copy to clipboard operation
pulumi-aws-native copied to clipboard

Provide does not use the region defined in AWS profile

Open mikhailshilkov opened this issue 1 year ago • 3 comments

What happened?

We expect AWS region to be defined in the stack config, or in AWS_REGION or AWS_DEFAULT_REGION environment variables. If none is defined, we throw an error: https://github.com/pulumi/pulumi-aws-native/blob/b962c3b2c972f570ab96c9003748f124178615f6/provider/pkg/provider/provider.go#L288-L296

However, it's possible to define a region in user's AWS profile. The AWS Classic provider respects that configuration, and AWS Native should do the same. Unfortunately, the profile check happens later in the code: https://github.com/pulumi/pulumi-aws-native/blob/b962c3b2c972f570ab96c9003748f124178615f6/provider/pkg/provider/provider.go#L298

Example

[MyAwsProfile]
region = eu-central-1
... other AWS profile configuration

Output of pulumi about

CLI          
Version      3.126.0
Go Version   go1.22.4
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.25.0
resource  aws-native  0.81.0
language  nodejs      unknown
resource  random      4.16.0

Host     
OS       darwin
Version  14.5
Arch     arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

mikhailshilkov avatar Jul 28 '24 19:07 mikhailshilkov

@mikhailshilkov do you know what the priority of this one is? Is it something we should fix this iteration or next?

corymhall avatar Jul 29 '24 14:07 corymhall

@corymhall It'd be nice to fix, but I don't have any strong timeline signal.

mikhailshilkov avatar Aug 21 '24 12:08 mikhailshilkov

Unfortunately, it looks like this issue hasn't seen any updates in a while. If you're still experiencing this issue, could you leave a quick comment to let us know so we can prioritize it?

github-actions[bot] avatar Jul 25 '25 04:07 github-actions[bot]