From 16c643f12c2d707e995a08e818b0bddbb782352f Mon Sep 17 00:00:00 2001 From: risticd Date: Wed, 26 Nov 2025 11:59:11 +0100 Subject: [PATCH 1/2] fix: Update port and protocol handling for GENEVE in aws_lb_listener --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 7538187..fcb4066 100644 --- a/main.tf +++ b/main.tf @@ -273,8 +273,8 @@ resource "aws_lb_listener" "this" { } } - port = coalesce(each.value.port, var.default_port) - protocol = coalesce(each.value.protocol, var.default_protocol) + port = contains(["GENEVE"], coalesce(each.value.protocol, var.default_protocol)) ? null : coalesce(each.value.port, var.default_port) + protocol = contains(["GENEVE"], coalesce(each.value.protocol, var.default_protocol)) ? null : coalesce(each.value.protocol, var.default_protocol) routing_http_request_x_amzn_mtls_clientcert_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_header_name : null routing_http_request_x_amzn_mtls_clientcert_issuer_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_issuer_header_name : null routing_http_request_x_amzn_mtls_clientcert_leaf_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_leaf_header_name : null From 77d407593eb510f2947b6facdf2fbb512d3239a0 Mon Sep 17 00:00:00 2001 From: Anton Babenko <393243+antonbabenko@users.noreply.github.com> Date: Wed, 26 Nov 2025 13:40:15 +0100 Subject: [PATCH 2/2] Apply suggestions from code review --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index fcb4066..fb7d1eb 100644 --- a/main.tf +++ b/main.tf @@ -273,8 +273,8 @@ resource "aws_lb_listener" "this" { } } - port = contains(["GENEVE"], coalesce(each.value.protocol, var.default_protocol)) ? null : coalesce(each.value.port, var.default_port) - protocol = contains(["GENEVE"], coalesce(each.value.protocol, var.default_protocol)) ? null : coalesce(each.value.protocol, var.default_protocol) + port = coalesce(each.value.protocol, var.default_protocol) != "GENEVE" ? coalesce(each.value.port, var.default_port) : null + protocol = coalesce(each.value.protocol, var.default_protocol) != "GENEVE" ? coalesce(each.value.protocol, var.default_protocol) : null routing_http_request_x_amzn_mtls_clientcert_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_header_name : null routing_http_request_x_amzn_mtls_clientcert_issuer_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_issuer_header_name : null routing_http_request_x_amzn_mtls_clientcert_leaf_header_name = coalesce(each.value.protocol, var.default_protocol) == "HTTPS" ? each.value.routing_http_request_x_amzn_mtls_clientcert_leaf_header_name : null