Skip to content

Commit 97fdb60

Browse files
Updates defaults and adds better support for using CodeDeploy with ECS/Fargate (#60)
Co-authored-by: Jared Darling <[email protected]>
1 parent 5d27bab commit 97fdb60

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test Continuous Integration/Delivery environment on AWS ECS.
1111

1212
## Use this code as a Terraform module
1313

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

main.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ resource "aws_lb_target_group" "lb_https_tgs" {
165165
}
166166
name = "${var.name_prefix}-${each.key}-https-${each.value.target_group_port}"
167167
port = each.value.target_group_port
168-
protocol = lookup(each.value, "target_group_protocol", "HTTPS")
168+
protocol = lookup(each.value, "target_group_protocol", "HTTP")
169169
vpc_id = var.vpc_id
170170
deregistration_delay = var.deregistration_delay
171171
slow_start = var.slow_start
@@ -182,7 +182,7 @@ resource "aws_lb_target_group" "lb_https_tgs" {
182182
enabled = var.target_group_health_check_enabled
183183
interval = var.target_group_health_check_interval
184184
path = var.target_group_health_check_path
185-
protocol = lookup(each.value, "target_group_protocol", "HTTPS")
185+
protocol = lookup(each.value, "target_group_protocol", "HTTP")
186186
timeout = var.target_group_health_check_timeout
187187
healthy_threshold = var.target_group_health_check_healthy_threshold
188188
unhealthy_threshold = var.target_group_health_check_unhealthy_threshold
@@ -248,6 +248,12 @@ resource "aws_lb_listener" "lb_http_listeners" {
248248
}
249249
}
250250

251+
lifecycle {
252+
ignore_changes = [
253+
default_action #Can be changed by CodeDeploy when used with Fargate
254+
]
255+
}
256+
251257
tags = var.tags
252258
}
253259

@@ -297,6 +303,12 @@ resource "aws_lb_listener" "lb_https_listeners" {
297303
}
298304
}
299305

306+
lifecycle {
307+
ignore_changes = [
308+
default_action #Can be changed by CodeDeploy when used with Fargate
309+
]
310+
}
311+
300312
tags = var.tags
301313
}
302314

0 commit comments

Comments
 (0)