chore: add aws provider v6 support for region attribute#47
Merged
Hazmei Abdul Rahman (hazmei) merged 2 commits intomainfrom Dec 8, 2025
Merged
Conversation
Copilot started reviewing on behalf of
Hazmei Abdul Rahman (hazmei)
December 8, 2025 06:52
View session
Co-authored-by: Goh Hong Yi <hygoh@sph.com.sg>
Goh Hong Yi (hong-yi)
approved these changes
Dec 8, 2025
There was a problem hiding this comment.
Pull request overview
This PR adds support for AWS provider v6 by introducing a region variable to explicitly specify the AWS region, replacing the previous dynamic region detection via the aws_region data source.
- Adds a new
regionvariable with a default value of "us-east-1" - Removes the
aws_regiondata source dependency - Updates all IAM policy ARN constructions to use the new variable
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| variables.tf | Introduces the region variable with type string and default "us-east-1" for explicit region configuration |
| main.tf | Passes the region variable to the lambda module to support region-specific lambda deployments |
| data.tf | Removes aws_region data source and updates 6 ARN references across IAM policy documents to use var.region instead of data.aws_region.current.region |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for using region attribute.
Defaults the region to ap-southeast-1