-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
54 lines (48 loc) · 1.43 KB
/
outputs.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
output "cluster_name" {
value = yandex_mdb_elasticsearch_cluster.this.name
description = "Elasticsearch cluster name"
}
output "cluster_id" {
value = yandex_mdb_elasticsearch_cluster.this.id
description = "Elasticsearch cluster ID"
}
output "cluster_service_account_id" {
value = yandex_mdb_elasticsearch_cluster.this.service_account_id
description = "Elasticsearch cluster service account ID"
}
output "cluster_data_hosts" {
value = [
for host in yandex_mdb_elasticsearch_cluster.this.host : {
name = host.name
fqdn = host.fqdn
zone = host.zone
subnet_id = host.subnet_id
} if host.type == "DATA_NODE"
]
description = "A list of Elasticsearch DATA hosts"
}
output "cluster_master_hosts" {
value = [
for host in yandex_mdb_elasticsearch_cluster.this.host : {
name = host.name
fqdn = host.fqdn
zone = host.zone
subnet_id = host.subnet_id
} if host.type == "MASTER_NODE"
]
description = "A list of Elasticsearch MASTER hosts"
}
output "cluster_cname_data_hosts" {
value = [
for host in yandex_dns_recordset.data_hosts.*.name :
trimsuffix(host, ".")
]
description = "A list of Elasticsearch CNAME DATA hosts"
}
output "cluster_cname_master_hosts" {
value = [
for host in yandex_dns_recordset.master_hosts.*.name :
trimsuffix(host, ".")
]
description = "A list of Elasticsearch CNAME MASTER hosts"
}