-
Notifications
You must be signed in to change notification settings - Fork 1
/
master_lb.tf
62 lines (51 loc) · 1.27 KB
/
master_lb.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
52
53
54
55
56
57
58
59
60
61
62
resource "aws_elb" "master" {
internal = "false"
subnets = ["${var.public_subnet_ids}"]
security_groups = ["${module.master.sg}"]
listener {
instance_port = 8443
instance_protocol = "https"
lb_port = 8443
lb_protocol = "https"
ssl_certificate_id = "${aws_acm_certificate.public_cert.arn}"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 3
target = "TCP:8443"
interval = 30
}
cross_zone_load_balancing = true
tags {
Name = "${var.environment}-master"
}
lifecycle {
create_before_destroy = true
}
}
resource "aws_elb" "internal_master" {
internal = "true"
subnets = ["${var.private_subnet_ids}"]
security_groups = ["${module.master.sg}"]
listener {
instance_port = 8443
instance_protocol = "tcp"
lb_port = 8443
lb_protocol = "tcp"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 3
target = "TCP:8443"
interval = 30
}
cross_zone_load_balancing = true
tags {
Name = "${var.environment}-internal_master"
}
lifecycle {
create_before_destroy = true
}
}