Skip to content

Commit

Permalink
Merge pull request #186 from dxw/fix-service-custom-host-headers
Browse files Browse the repository at this point in the history
Fix service custom host headers
  • Loading branch information
Stretch96 authored Nov 25, 2024
2 parents a29fc8a + 08f286a commit da70c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecs-cluster-infrastructure-service-alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ resource "aws_alb_listener_rule" "infrastructure_ecs_cluster_service_host_header

resource "aws_alb_listener_rule" "infrastructure_ecs_cluster_service_host_header_custom" {
for_each = {
for k, service in local.infrastructure_ecs_cluster_services : k => service if service["domain_names"] != null ? length(service["domain_names"]) > 0 : service["container_port"] != 0
for k, service in local.infrastructure_ecs_cluster_services : k => service if service["domain_names"] != null ? length(service["domain_names"]) > 0 && service["container_port"] != 0 : false
}

listener_arn = each.value["alb_tls_certificate_arn"] != null ? aws_alb_listener.infrastructure_ecs_cluster_service_https[0].arn : aws_alb_listener.infrastructure_ecs_cluster_service_http[0].arn
Expand Down

0 comments on commit da70c8b

Please sign in to comment.