-
Notifications
You must be signed in to change notification settings - Fork 14
/
elb.tf
47 lines (42 loc) · 1.36 KB
/
elb.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
resource "aws_elb" "jenkins" {
name = "${var.project}-${var.environment}-${var.component}-${var.name}"
internal = "${var.elb_internal}"
idle_timeout = "${var.elb_idle_timeout}"
connection_draining = "${var.elb_connection_draining}"
connection_draining_timeout = "${var.elb_connection_draining_timeout}"
cross_zone_load_balancing = "${var.elb_cross_zone_load_balancing}"
security_groups = ["${aws_security_group.elb.id}"]
subnets = ["${module.elb_subnets.subnet_ids}"]
listener {
instance_port = 8080
instance_protocol = "HTTP"
lb_port = "${var.elb_port}"
lb_protocol = "${var.elb_protocol}"
}
listener {
instance_port = 49187
instance_protocol = "TCP"
lb_port = 49187
lb_protocol = "TCP"
}
health_check {
healthy_threshold = "${var.elb_healthy_threshold}"
unhealthy_threshold = "${var.elb_unhealthy_threshold}"
timeout = "${var.elb_healthcheck_timeout}"
target = "TCP:8080"
interval = "${var.elb_healthcheck_interval}"
}
tags = "${merge(
var.default_tags,
map(
"Name", format(
"%s-%s-%s/%s",
var.project,
var.environment,
var.component,
var.name
),
"Module", var.module
)
)}"
}