forked from danisla/terraform-google-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlb.tf
57 lines (52 loc) · 1.97 KB
/
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
// Client internal client load balancer IP address
resource "google_compute_address" "es_client_ilb" {
name = "${var.cluster_name}-client-ilb"
address_type = "INTERNAL"
subnetwork = "${google_compute_subnetwork.default.self_link}"
}
// Client internal load balancer
module "es_client_ilb" {
source = "GoogleCloudPlatform/lb-internal/google"
version = "1.0.4"
region = "${var.region}"
name = "${var.cluster_name}-client-ilb"
ip_address = "${google_compute_address.es_client_ilb.address}"
ports = ["9200", "9300"]
health_port = "9200"
http_health_check = true
source_tags = ["${var.cluster_name}-kibana", "${var.cluster_name}-external"]
target_tags = ["${var.cluster_name}-client"]
network = "${google_compute_subnetwork.default.name}"
subnetwork = "${google_compute_subnetwork.default.name}"
backends = [
{
group = "${module.es_client.instance_group}"
},
]
}
// Indexing internal load balancer IP address.
resource "google_compute_address" "es_indexing_ilb" {
name = "${var.cluster_name}-indexing-ilb"
address_type = "INTERNAL"
subnetwork = "${google_compute_subnetwork.default.self_link}"
}
// Indexing internal load balancer
module "es_indexing_ilb" {
source = "GoogleCloudPlatform/lb-internal/google"
version = "1.0.4"
region = "${var.region}"
name = "${var.cluster_name}-indexing-ilb"
ip_address = "${google_compute_address.es_indexing_ilb.address}"
ports = ["9200", "9300"]
health_port = "9200"
http_health_check = true
source_tags = ["${var.cluster_name}-external"]
target_tags = ["${var.cluster_name}-indexing"]
network = "${google_compute_subnetwork.default.name}"
subnetwork = "${google_compute_subnetwork.default.name}"
backends = [
{
group = "${module.es_indexing.instance_group}"
},
]
}