Skip to content

Commit

Permalink
update: remove instance target group from ECS module
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-4480 committed Jul 24, 2024
1 parent a9827f9 commit c4f111e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion modules/ecs/autoscaling.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ resource "aws_autoscaling_group" "this" {
version = "$Latest"
}

target_group_arns = [aws_lb_target_group.instance_target[0].arn]
protect_from_scale_in = true

tag {
Expand Down
16 changes: 0 additions & 16 deletions modules/ecs/load-balancer.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
resource "aws_lb_target_group" "instance_target" {
count = var.endpoint_details != null ? 1 : 0
name = format("%s-%s-instance", var.service_name, terraform.workspace)
port = local.main_container_port
protocol = "HTTP"
vpc_id = var.vpc_id
target_type = local.alb_instance_target_type

health_check {
protocol = "HTTP"
interval = 10
unhealthy_threshold = 6
matcher = "200,301-399"
}
}

resource "aws_lb_target_group" "ip_target" {
count = var.endpoint_details != null ? 1 : 0
name = format("%s-%s-ip", var.service_name, terraform.workspace)
Expand Down
1 change: 0 additions & 1 deletion modules/ecs/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ locals {
iam_instance_role_name_prefix = "ecs-instance-role"
iam_instance_profile_name_prefix = "ecs-instance-profile"
task_definition_network_mode = "awsvpc"
alb_instance_target_type = "instance"
alb_ip_target_type = "ip"
authenticate_oidc_issuer = "https://accounts.google.com"
authenticate_oidc_user_info_endpoint = "https://openidconnect.googleapis.com/v1/userinfo"
Expand Down

0 comments on commit c4f111e

Please sign in to comment.