Skip to content

Commit

Permalink
feat(infra): migrate ECS setup to Fargate with awsvpc network mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Anzanda committed Dec 29, 2024
1 parent b0e3bf8 commit ca17132
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "aws_ecs_task_definition" "this" {
family = var.task_definition.family
requires_compatibilities = ["EC2"]
network_mode = "bridge"
requires_compatibilities = ["FARGATE"]
network_mode = "awsvpc"
cpu = var.task_definition.cpu
memory = var.task_definition.memory
container_definitions = var.task_definition.container_definitions
Expand All @@ -14,7 +14,7 @@ resource "aws_ecs_service" "this" {
cluster = var.ecs_service.cluster_arn
task_definition = aws_ecs_task_definition.this.family
desired_count = var.ecs_service.desired_count
launch_type = "EC2"
launch_type = "FARGATE"
force_new_deployment = true

dynamic "load_balancer" {
Expand Down

0 comments on commit ca17132

Please sign in to comment.