Skip to content

Commit

Permalink
Update lb tg to use target type to ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Jul 25, 2024
1 parent f494283 commit 1fd222d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion infrastructure/cloud/modules/container/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "aws_ecs_service" "ecs_service" {
desired_count = 1

network_configuration {
subnets = var.subnet_id
subnets = [var.subnet_id]
security_groups = [var.ecs_sg_id]
assign_public_ip = false
}
Expand Down
9 changes: 5 additions & 4 deletions infrastructure/cloud/modules/networking/elb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ resource "aws_lb" "lb" {


resource "aws_lb_target_group" "lb_target_group" {
name = "${var.app_name}-tg-${var.environment}"
port = 80
protocol = "HTTP"
vpc_id = aws_vpc.vpc.id
name = "${var.app_name}-tg-${var.environment}"
port = 80
protocol = "HTTP"
vpc_id = aws_vpc.vpc.id
target_type = "ip"
}

resource "aws_lb_listener" "lb_listener" {
Expand Down

0 comments on commit 1fd222d

Please sign in to comment.