-
Notifications
You must be signed in to change notification settings - Fork 0
/
elb.tf
51 lines (46 loc) · 1.44 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
48
49
50
51
resource "aws_elb" "grafana" {
name = "${terraform.workspace}-grafana"
subnets = ["${local.subnet_public_app_ids}"]
security_groups = ["${aws_security_group.grafana-elb.id}"]
instances = ["${aws_instance.node.*.id}", "${aws_instance.manager.*.id}"]
listener {
instance_port = 3000
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 4
target = "TCP:3000"
interval = 5
}
tags {
Environment = "${terraform.workspace}"
Project = "${var.project}"
}
}
resource "aws_elb" "kibana" {
name = "${terraform.workspace}-kibana"
subnets = ["${local.subnet_public_app_ids}"]
security_groups = ["${aws_security_group.kibana-elb.id}"]
instances = ["${aws_instance.node.*.id}", "${aws_instance.manager.*.id}"]
listener {
instance_port = 5601
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 4
target = "TCP:5601"
interval = 5
}
tags {
Environment = "${terraform.workspace}"
Project = "${var.project}"
}
}