Skip to content

Conversation

@hazmei
Copy link
Contributor

@hazmei hazmei commented Dec 8, 2025

Add support for using region attribute.

Defaults the region to ap-southeast-1

Co-authored-by: Goh Hong Yi <hygoh@sph.com.sg>
@hazmei hazmei requested a review from hong-yi December 8, 2025 06:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 region variable with a default value of "us-east-1"
  • Removes the aws_region data 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.

@hazmei hazmei merged commit 5c5c17f into main Dec 8, 2025
8 checks passed
@hazmei hazmei deleted the chore/add-support-aws-v6-region-attribute branch December 8, 2025 06:57
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.

2 participants