Skip to content

Conversation

emuesuenu
Copy link
Contributor

@emuesuenu emuesuenu commented Jul 25, 2025

Description

This PR fixes an issue in the aws_region data source by correctly utilizing the var.region variable to ensure the correct AWS region is retrieved. Previously, the region was hardcoded or incorrectly referenced, leading to potential mismatches or unexpected behaviors.

Motivation and Context

Using a hardcoded or incorrectly referenced AWS region can result in deployments occurring in unintended regions, potentially causing resource conflicts or compliance issues. By using the existing var.region, this change ensures consistency and correctness in the configuration.

#347

Breaking Changes

No breaking changes introduced. This modification simply corrects the region reference.

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 chcdanges using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@emuesuenu emuesuenu changed the title fix: use the specified region to retrieve the current AWS region fix: Use the specified region to retrieve the current AWS region Jul 25, 2025
fix: use var.region in aws_region data source to retrieve correct region
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

thanks!

@bryantbiggs bryantbiggs merged commit 453fcb9 into terraform-aws-modules:master Aug 5, 2025
18 checks passed
antonbabenko pushed a commit that referenced this pull request Aug 5, 2025
## [5.3.1](v5.3.0...v5.3.1) (2025-08-05)

### Bug Fixes

* Use the specified region to retrieve the current AWS region ([#348](#348)) ([453fcb9](453fcb9))
@antonbabenko
Copy link
Member

This PR is included in version 5.3.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants