feat: enhanced region support#177
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the Terraform module to use AWS provider 6.x and Terraform 1.5.7, implementing enhanced region support and updating deprecated attributes. The upgrade ensures compatibility with the latest AWS provider features while maintaining backward compatibility through careful handling of breaking changes.
- Updated minimum Terraform version from 1.3 to 1.5.7 and AWS provider from 5.32 to 6.0
- Replaced deprecated
data.aws_region.current.namewithdata.aws_region.current.regionthroughout the codebase - Refactored IAM task execution role to use inline policies instead of deprecated
managed_policy_arns
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| versions.tf | Updated core Terraform and AWS provider version constraints |
| variables.tf | Added new region variable for enhanced region support |
| data.tf | Updated aws_region data source to support region parameter |
| iam.tf | Refactored task execution role from managed_policy_arns to inline policy |
| main.tf | Added region parameters to resources and updated security group module references |
| modules/ | Updated submodules with version constraints and region support |
| examples/ | Updated example configurations with new version requirements |
d07aafe to
e582281
Compare
| @@ -1,4 +1,4 @@ | |||
| FROM python:3.12-alpine | |||
| FROM python:3.13-alpine | |||
There was a problem hiding this comment.
Add Instead of Copy
on resource FROM python:3.13-alpine AS python:3.13-alpine.ADD index.html
More Details
Should use COPY instead of ADD unless, running a tar file
Expected
'COPY index.html'
Found
'ADD index.html'
Rule ID: 90792b6a-36b2-4ffa-ad6c-fb8240b79470
| @@ -1,4 +1,4 @@ | |||
| FROM python:3.12-alpine | |||
| FROM python:3.13-alpine | |||
There was a problem hiding this comment.
Add Instead of Copy
on resource FROM python:3.13-alpine AS python:3.13-alpine.ADD server.py
More Details
Should use COPY instead of ADD unless, running a tar file
Expected
'COPY server.py'
Found
'ADD server.py'
Rule ID: 90792b6a-36b2-4ffa-ad6c-fb8240b79470
| @@ -1,4 +1,4 @@ | |||
| FROM python:3.12-alpine | |||
| FROM python:3.13-alpine | |||
There was a problem hiding this comment.
Healthcheck Instruction Missing
on resource FROM python:3.13-alpine AS python:3.13-alpine
More Details
Ensure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working
Expected
Dockerfile should contain instruction 'HEALTHCHECK'
Found
Dockerfile doesn't contain instruction 'HEALTHCHECK'
Rule ID: 39e62251-8073-455f-b8f1-5c2b6178d4ea
e582281 to
fd52167
Compare
This PR adds enhanced region support throughout the module and submodules.
Important
The PR is currently blocked by terraform-aws-modules/terraform-aws-security-group#341