forked from knakayama/terraform-circleci-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
elb.tf
28 lines (25 loc) · 720 Bytes
/
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
resource "aws_elb" "elb" {
name = "${var.name}-elb"
subnets = ["${aws_subnet.frontend_subnet.*.id}"]
security_groups = ["${aws_security_group.elb.id}"]
cross_zone_load_balancing = true
connection_draining = true
connection_draining_timeout = 300
idle_timeout = 60
listener {
lb_port = 80
lb_protocol = "http"
instance_port = 80
instance_protocol = "http"
}
health_check {
healthy_threshold = 10
unhealthy_threshold = 2
timeout = 5
target = "HTTP:80/index.html"
interval = 30
}
tags {
Name = "${var.name}-elb"
}
}