Skip to content

Commit

Permalink
Updates defaults and adds better support for using CodeDeploy with EC…
Browse files Browse the repository at this point in the history
…S/Fargate (#60)

Co-authored-by: Jared Darling <jdarling@aimconsulting.com>
  • Loading branch information
JaredDarling and jdarling-aim committed Sep 28, 2023
1 parent 5d27bab commit 97fdb60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Test Continuous Integration/Delivery environment on AWS ECS.

## Use this code as a Terraform module

Check valid versions on:
Check valid versions on:
* Github Releases: <https://github.com/cn-terraform/terraform-aws-ecs-alb/releases>
* Terraform Module Registry: <https://registry.terraform.io/modules/cn-terraform/ecs-alb/aws>

Expand Down
16 changes: 14 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ resource "aws_lb_target_group" "lb_https_tgs" {
}
name = "${var.name_prefix}-${each.key}-https-${each.value.target_group_port}"
port = each.value.target_group_port
protocol = lookup(each.value, "target_group_protocol", "HTTPS")
protocol = lookup(each.value, "target_group_protocol", "HTTP")
vpc_id = var.vpc_id
deregistration_delay = var.deregistration_delay
slow_start = var.slow_start
Expand All @@ -182,7 +182,7 @@ resource "aws_lb_target_group" "lb_https_tgs" {
enabled = var.target_group_health_check_enabled
interval = var.target_group_health_check_interval
path = var.target_group_health_check_path
protocol = lookup(each.value, "target_group_protocol", "HTTPS")
protocol = lookup(each.value, "target_group_protocol", "HTTP")
timeout = var.target_group_health_check_timeout
healthy_threshold = var.target_group_health_check_healthy_threshold
unhealthy_threshold = var.target_group_health_check_unhealthy_threshold
Expand Down Expand Up @@ -248,6 +248,12 @@ resource "aws_lb_listener" "lb_http_listeners" {
}
}

lifecycle {
ignore_changes = [
default_action #Can be changed by CodeDeploy when used with Fargate
]
}

tags = var.tags
}

Expand Down Expand Up @@ -297,6 +303,12 @@ resource "aws_lb_listener" "lb_https_listeners" {
}
}

lifecycle {
ignore_changes = [
default_action #Can be changed by CodeDeploy when used with Fargate
]
}

tags = var.tags
}

Expand Down

0 comments on commit 97fdb60

Please sign in to comment.