Skip to content

Commit

Permalink
Variable to make AWS ELB idle timeout configurable
Browse files Browse the repository at this point in the history
* we need a longer idle timeout than the default 60s for some tests
  • Loading branch information
jochenehret authored and rkoster committed May 4, 2023
1 parent ad241f7 commit 987b2ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/aws/templates/cf_lb.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variable "elb_idle_timeout" {
type = number
default = 60
}

resource "aws_security_group" "cf_ssh_lb_security_group" {
name = "${var.env_id}-cf-ssh-lb-security-group"
description = "CF SSH"
Expand Down Expand Up @@ -81,6 +86,8 @@ resource "aws_elb" "cf_ssh_lb" {
lb_protocol = "tcp"
}

idle_timeout = "${var.elb_idle_timeout}"

security_groups = ["${aws_security_group.cf_ssh_lb_security_group.id}"]
subnets = flatten(["${aws_subnet.lb_subnets.*.id}"])

Expand Down Expand Up @@ -210,6 +217,8 @@ resource "aws_elb" "cf_router_lb" {
ssl_certificate_id = "${aws_iam_server_certificate.lb_cert.arn}"
}

idle_timeout = "${var.elb_idle_timeout}"

security_groups = ["${aws_security_group.cf_router_lb_security_group.id}"]
subnets = flatten(["${aws_subnet.lb_subnets.*.id}"])

Expand Down Expand Up @@ -1024,6 +1033,8 @@ resource "aws_elb" "cf_tcp_lb" {
lb_protocol = "tcp"
}

idle_timeout = "${var.elb_idle_timeout}"

security_groups = ["${aws_security_group.cf_tcp_lb_security_group.id}"]
subnets = flatten(["${aws_subnet.lb_subnets.*.id}"])

Expand Down

0 comments on commit 987b2ba

Please sign in to comment.