-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathoutputs.tf
More file actions
116 lines (89 loc) · 2.37 KB
/
outputs.tf
File metadata and controls
116 lines (89 loc) · 2.37 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Outputs:
# - Private IP
# - Public IP
# - Private node name
# - Public node name
# iSCSI server
output "iscsisrv_ip" {
value = module.iscsi_server.iscsisrv_ip
}
output "iscsisrv_public_ip" {
value = join("", module.iscsi_server.iscsisrv_public_ip)
}
output "iscsisrv_name" {
value = join("", module.iscsi_server.iscsisrv_name)
}
output "iscsisrv_public_name" {
value = join("", module.iscsi_server.iscsisrv_public_name)
}
# Hana nodes
output "hana_ip" {
value = module.hana_node.hana_ip
}
output "hana_public_ip" {
value = module.hana_node.hana_public_ip
}
output "hana_name" {
value = module.hana_node.hana_name
}
output "hana_public_name" {
value = module.hana_node.hana_public_name
}
# Monitoring
output "monitoring_ip" {
value = module.monitoring.monitoring_ip
}
output "monitoring_public_ip" {
value = module.monitoring.monitoring_public_ip
}
output "monitoring_name" {
value = module.monitoring.monitoring_name
}
output "monitoring_public_name" {
value = module.monitoring.monitoring_public_name
}
# drbd
output "drbd_ip" {
value = module.drbd_node.drbd_ip
}
output "drbd_public_ip" {
value = module.drbd_node.drbd_public_ip
}
output "drbd_name" {
value = module.drbd_node.drbd_name
}
output "drbd_public_name" {
value = module.drbd_node.drbd_public_name
}
# netweaver
output "netweaver_ip" {
value = module.netweaver_node.netweaver_ip
}
output "netweaver_public_ip" {
value = module.netweaver_node.netweaver_public_ip
}
output "netweaver_name" {
value = module.netweaver_node.netweaver_name
}
output "netweaver_public_name" {
value = module.netweaver_node.netweaver_public_name
}
# Ansible inventory
resource "local_file" "ansible_inventory" {
content = templatefile("inventory.tmpl",
{
hana_name = var.hana_name,
hana_pip = module.hana_node.hana_public_ip,
hana_remote_python = var.hana_remote_python,
iscsi_name = var.iscsi_name,
iscsi_pip = module.iscsi_server.iscsisrv_public_ip,
iscsi_enabled = local.iscsi_enabled,
iscsi_remote_python = var.iscsi_remote_python,
use_sbd = local.use_sbd,
routetable_id = aws_route_table.route-table.id,
virtual_ip = local.hana_cluster_vip,
stonith_tag = module.hana_node.stonith_tag
region = var.aws_region
})
filename = "inventory.yaml"
}