Skip to content

Commit 025eef4

Browse files
authored
feat: Add support for preserve_client_ip tg flag (#213)
1 parent e643496 commit 025eef4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/complete-nlb/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ module "nlb" {
102102

103103
target_groups = [
104104
{
105-
name_prefix = "tu1-"
106-
backend_protocol = "TCP_UDP"
107-
backend_port = 81
108-
target_type = "instance"
105+
name_prefix = "tu1-"
106+
backend_protocol = "TCP_UDP"
107+
backend_port = 81
108+
target_type = "instance"
109+
preserve_client_ip = true
109110
tags = {
110111
tcp_udp = true
111112
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ resource "aws_lb_target_group" "main" {
7070
proxy_protocol_v2 = lookup(var.target_groups[count.index], "proxy_protocol_v2", false)
7171
lambda_multi_value_headers_enabled = lookup(var.target_groups[count.index], "lambda_multi_value_headers_enabled", false)
7272
load_balancing_algorithm_type = lookup(var.target_groups[count.index], "load_balancing_algorithm_type", null)
73+
preserve_client_ip = lookup(var.target_groups[count.index], "preserve_client_ip", null)
7374

7475
dynamic "health_check" {
7576
for_each = length(keys(lookup(var.target_groups[count.index], "health_check", {}))) == 0 ? [] : [lookup(var.target_groups[count.index], "health_check", {})]

0 commit comments

Comments
 (0)