-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
providers/aws: add aws_s3_bucket resource region argument #6051
Comments
In v0.6.16 you can specify the region for an aws_s3_bucket, but it seems the attribute was left out from the documentation. |
@marcoamorales It's looks visible in the code, but if you test it, you'll see it doesn't work:
The above says it applies successfully, but instead uses the global region used by terraform. (from ENV or the provider aws block.) The reason is that Terraform uses helpers to initiate the golang SDK for every possible resource when it starts up, I wasn't able to think of a clean (non-hacky) way of re-initiating the helper each time a new S3 resource is requested. Of note, I found that it's kind of mute since you can specify the region on a per module basis. |
Also interested in region support for s3 buckets. |
We have a use case where a single module needs to create an S3 buckets in multiple regions. In fact, they're being created in the same Between this issue and #3072 / #1819, there's no way to do this in a generic way driven by vars. |
Yep looks like we read the region from the client, but don't fetch the value from the config to override it. Should be a pretty easy fix! |
Hi guys, Just worked on this in #10482 . Hope it will fit! |
I am still experiencing this error. I shouldn't have to define another provider to access another region. It's not respecting region flag inside the bucket. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The current version of aws_s3_bucket doesn't support the region argument. It accepts input and will show it in planning / apply, but it doesn't apply it and throws no errors.
Having this as a feature would be useful for defining resources outside your default region (which is often us-east-1, due to some global resources not being available in every region).
Terraform v0.6.15-dev (aef5bcf98227b0ac964657a29ef2a1ebeed19a51)
The text was updated successfully, but these errors were encountered: