This repository was archived by the owner on Jan 25, 2026. It is now read-only.
chore: Reduce infra cost by switching from 3-tier to 1-tier architecture#2
Merged
chore: Reduce infra cost by switching from 3-tier to 1-tier architecture#2
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates the infrastructure to reduce costs and simplify management by merging redundant resources, unifying naming conventions, and standardizing configurations across modules.
- Merged internal and external ALB resources and updated ACM, Route53 configurations accordingly.
- Consolidated multiple ECS clusters, task definitions, services, and capacity providers into unified resources.
- Aligned subnet references and removed redundant networking and database resources.
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Modules/RDS/* | Renamed subnet variable from database_subnets to public_subnets. |
| Modules/Networking/* | Removed private/database subnet resources; retained public subnet usage. |
| Modules/IAM/* | Consolidated ECS IAM roles by replacing separate roles with a unified one. |
| Modules/ElastiCache/* | Updated subnet variable reference similarly to RDS. |
| Modules/ECS/* | Consolidated ECS clusters, task definitions, services, and capacity providers. |
| Modules/DocumentDB/* | Updated subnet references from database_subnets to public_subnets. |
| Modules/CloudWatch/* | Unified log group outputs into a single ECS log group. |
| Modules/ALB/* | Unified ALB resources and updated target group, listener, and certificate references. |
| Modules/ACM/* | Renamed ACM resources to align with updated ALB naming conventions. |
Comments suppressed due to low confidence (2)
Modules/ECS/main.tf:16
- The network mode for the unified ECS task definition has been changed from 'awsvpc' to 'bridge'. Verify that this change is compatible with your service requirements, including port mappings and task networking.
network_mode = "bridge"
Modules/ALB/main.tf:20
- The target type for the ALB target group has been changed from 'ip' to 'instance'. Ensure that this change aligns with the new ECS task configuration and that instances will be correctly registered with the ALB.
target_type = "instance"
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This pull request consolidates and simplifies the infrastructure by removing expensive resources and standardizing naming conventions across modules. Key changes include merging internal and external resources, unifying ECS clusters and ALBs, and updating variable names for consistency.