Skip to content
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
jongwooo merged 7 commits intomainfrom
chore/renewal-infrastructure
May 30, 2025
Merged

chore: Reduce infra cost by switching from 3-tier to 1-tier architecture#2
jongwooo merged 7 commits intomainfrom
chore/renewal-infrastructure

Conversation

@jongwooo
Copy link
Contributor

@jongwooo jongwooo commented May 30, 2025

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.

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.

@jongwooo jongwooo requested a review from Copilot May 30, 2025 20:00
@jongwooo jongwooo self-assigned this May 30, 2025
@jongwooo jongwooo added the chore label May 30, 2025
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 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"

@jongwooo jongwooo merged commit ca266ac into main May 30, 2025
1 check passed
@jongwooo jongwooo deleted the chore/renewal-infrastructure branch May 30, 2025 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant