-
Notifications
You must be signed in to change notification settings - Fork 1
/
elb_master.tf
43 lines (34 loc) · 973 Bytes
/
elb_master.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
// ELB for the k8s API
resource "aws_elb" "master" {
name = "${var.elb_name}-master"
subnets = ["${var.vpc_subnet_ids_list}"]
security_groups = ["${aws_security_group.master-elb.id}"]
tags {
KubernetesCluster = "${var.cluster_name}"
}
listener {
instance_port = 80
instance_protocol = "http"
lb_port = 443
lb_protocol = "https"
ssl_certificate_id = "${data.aws_acm_certificate.root_cert.arn}"
}
listener {
instance_port = 80
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
health_check {
// The number of checks before the instance is declared healthy.
healthy_threshold = 2
// The number of checks before the instance is declared unhealthy.
unhealthy_threshold = 6
// In seconds
timeout = 5
// In seconds
interval = 10
target = "TCP:80"
}
instances = ["${aws_instance.master.*.id}"]
}