Skip to content

Commit

Permalink
feat: Add support for client_keep_alive (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenbaum committed Apr 20, 2024
1 parent eb15097 commit 66863e0
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 15 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ See [patterns.md](https://github.com/terraform-aws-modules/terraform-aws-alb/blo
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.33 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.46 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.33 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.46 |

## Modules

Expand Down Expand Up @@ -387,6 +387,7 @@ No modules.
| <a name="input_access_logs"></a> [access\_logs](#input\_access\_logs) | Map containing access logging configuration for load balancer | `map(string)` | `{}` | no |
| <a name="input_additional_target_group_attachments"></a> [additional\_target\_group\_attachments](#input\_additional\_target\_group\_attachments) | Map of additional target group attachments to create. Use `target_group_key` to attach to the target group created in `target_groups` | `any` | `{}` | no |
| <a name="input_associate_web_acl"></a> [associate\_web\_acl](#input\_associate\_web\_acl) | Indicates whether a Web Application Firewall (WAF) ACL should be associated with the load balancer | `bool` | `false` | no |
| <a name="input_client_keep_alive"></a> [client\_keep\_alive](#input\_client\_keep\_alive) | Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. | `number` | `null` | no |
| <a name="input_connection_logs"></a> [connection\_logs](#input\_connection\_logs) | Map containing access logging configuration for load balancer | `map(string)` | `{}` | no |
| <a name="input_create"></a> [create](#input\_create) | Controls if resources should be created (affects nearly all resources) | `bool` | `true` | no |
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines if a security group is created | `bool` | `true` | no |
Expand Down
4 changes: 2 additions & 2 deletions examples/complete-alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.33 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.46 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.33 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.46 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |

## Modules
Expand Down
2 changes: 2 additions & 0 deletions examples/complete-alb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ module "alb" {
prefix = "connection-logs"
}

client_keep_alive = 7200

listeners = {
ex-http-https-redirect = {
port = 80
Expand Down
2 changes: 1 addition & 1 deletion examples/complete-alb/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33"
version = ">= 5.46"
}
null = {
source = "hashicorp/null"
Expand Down
4 changes: 2 additions & 2 deletions examples/complete-nlb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.33 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.46 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.33 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.46 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/complete-nlb/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33"
version = ">= 5.46"
}
}
}
4 changes: 2 additions & 2 deletions examples/mutual-auth-alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.33 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.46 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 4.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.33 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.46 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 4.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/mutual-auth-alb/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33"
version = ">= 5.46"
}
null = {
source = "hashicorp/null"
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ resource "aws_lb" "this" {
}
}

client_keep_alive = var.client_keep_alive
customer_owned_ipv4_pool = var.customer_owned_ipv4_pool
desync_mitigation_mode = var.desync_mitigation_mode
dns_record_client_routing_policy = var.dns_record_client_routing_policy
Expand Down
4 changes: 2 additions & 2 deletions modules/lb_trust_store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ module "trust_store" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.33 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.46 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.33 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.46 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/lb_trust_store/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33"
version = ">= 5.46"
}
}
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ variable "connection_logs" {
default = {}
}

variable "client_keep_alive" {
description = "Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds."
type = number
default = null
}

variable "customer_owned_ipv4_pool" {
description = "The ID of the customer owned ipv4 pool to use for this load balancer"
type = string
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33"
version = ">= 5.46"
}
}
}
1 change: 1 addition & 0 deletions wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module "wrapper" {
access_logs = try(each.value.access_logs, var.defaults.access_logs, {})
additional_target_group_attachments = try(each.value.additional_target_group_attachments, var.defaults.additional_target_group_attachments, {})
associate_web_acl = try(each.value.associate_web_acl, var.defaults.associate_web_acl, false)
client_keep_alive = try(each.value.client_keep_alive, var.defaults.client_keep_alive, null)
connection_logs = try(each.value.connection_logs, var.defaults.connection_logs, {})
create = try(each.value.create, var.defaults.create, true)
create_security_group = try(each.value.create_security_group, var.defaults.create_security_group, true)
Expand Down

0 comments on commit 66863e0

Please sign in to comment.