Skip to content

feat!: Handle new region parameter introduced in terraform-aws 6.0 #156

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

Merged

Conversation

guillaumelecerf
Copy link
Contributor

@guillaumelecerf guillaumelecerf commented Jun 23, 2025

Description

Handle the new region parameter introduced in terrafrom-aws provider 6.0.

Motivation and Context

This allows to specify the region to create the resources into, instead of relying on a dedicated provider instance.

Breaking Changes

This requires terraform-aws >= 6.0.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@guillaumelecerf guillaumelecerf changed the title feat!: handle new region parameter feat!: Handle new region parameter introduced in terraform-aws 6.0 Jun 23, 2025
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryantbiggs WDYT? Should we add support for the newly introduced "region" argument in all Terraform AWS modules? I personally think - yes, but I am trying to think about different scenarios when this can be a bad idea.

@antonbabenko antonbabenko requested a review from bryantbiggs June 23, 2025 13:34
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for Bryant's feedback... I think we should add region on all resources, even if some of them are rather global (like aws_route53_record).

@guillaumelecerf
Copy link
Contributor Author

guillaumelecerf commented Jun 23, 2025

Waiting for Bryant's feedback... I think we should add region on all resources, even if some of them are rather global (like aws_route53_record).

Unfortunately, global resources like aws_route53_record do not support the region parameter, that's why I didn't add it.

@bryantbiggs
Copy link
Member

@bryantbiggs WDYT? Should we add support for the newly introduced "region" argument in all Terraform AWS modules? I personally think - yes, but I am trying to think about different scenarios when this can be a bad idea.

yes, I completely agree. since this is a breaking change, could we also bump the MSV of Terraform to at least 1.10.0 as well? this covers both the optional variable attributes and the new ephemeral secrets/inputs

@guillaumelecerf
Copy link
Contributor Author

yes, I completely agree. since this is a breaking change, could we also bump the MSV of Terraform to at least 1.10.0 as well? this covers both the optional variable attributes and the new ephemeral secrets/inputs

I pushed a new commit, tell me if it's OK for you.

…ew features (optional variable attributes, ephemeral values...)
@guillaumelecerf guillaumelecerf force-pushed the feature/region branch 2 times, most recently from cc8c826 to b7558a3 Compare June 23, 2025 15:51
@bryantbiggs bryantbiggs merged commit e503ecd into terraform-aws-modules:master Jun 23, 2025
9 checks passed
antonbabenko pushed a commit that referenced this pull request Jun 23, 2025
## [6.0.0](v5.2.0...v6.0.0) (2025-06-23)

### ⚠ BREAKING CHANGES

* Handle new region parameter introduced in terraform-aws 6.0 (#156)

### Features

* Handle new region parameter introduced in terraform-aws 6.0 ([#156](#156)) ([e503ecd](e503ecd))
@antonbabenko
Copy link
Member

This PR is included in version 6.0.0 🎉

@guillaumelecerf
Copy link
Contributor Author

👍 thanks a lot to both of you for your responsiveness!

@guillaumelecerf guillaumelecerf deleted the feature/region branch June 23, 2025 16:12
@globart
Copy link

globart commented Jun 23, 2025

@bryantbiggs WDYT? Should we add support for the newly introduced "region" argument in all Terraform AWS modules? I personally think - yes, but I am trying to think about different scenarios when this can be a bad idea.

yes, I completely agree. since this is a breaking change, could we also bump the MSV of Terraform to at least 1.10.0 as well? this covers both the optional variable attributes and the new ephemeral secrets/inputs

@bryantbiggs I think you have to be careful with this, because as far as I know some people have TF version pinned at 1.5.x, because the license was changed to BSL from 1.6.0 onwards

@bryantbiggs
Copy link
Member

I mean, unfortunately thats outside of our control. The license change should not affect module users - that should really only affect folks who have created a competing business and will have to adhere to the license

@sidick
Copy link

sidick commented Jun 24, 2025

I mean, unfortunately thats outside of our control. The license change should not affect module users - that should really only affect folks who have created a competing business and will have to adhere to the license

Unfortunately it also breaks OpenTofu support

Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants