-
Notifications
You must be signed in to change notification settings - Fork 46
/
setup.tf
53 lines (43 loc) · 1.11 KB
/
setup.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
locals {
auto_setup = var.auto_setup
leader_custom_setup_base64 = var.leader_custom_setup_base64
nodes_custom_setup_base64 = var.nodes_custom_setup_base64
full_leader_user_data_base64 = base64encode(
templatefile(
"${path.module}/scripts/entrypoint.leader.full.sh.tpl",
{
JVM_ARGS = var.leader_jvm_args,
}
)
)
full_nodes_user_data_base64 = base64encode(
templatefile(
"${path.module}/scripts/entrypoint.node.full.sh.tpl",
{
JVM_ARGS = var.nodes_jvm_args
}
)
)
light_nodes_user_data_base64 = base64encode(
templatefile(
"${path.module}/scripts/entrypoint.node.full.sh.tpl",
{
JVM_ARGS = var.nodes_jvm_args
}
)
)
leader_user_data_base64 = (
local.auto_setup ?
local.full_leader_user_data_base64 :
local.leader_custom_setup_base64 != "" ?
local.leader_custom_setup_base64 :
""
)
nodes_user_data_base64 = (
local.auto_setup ?
local.full_nodes_user_data_base64 :
local.nodes_custom_setup_base64 != "" ?
local.nodes_custom_setup_base64 :
""
)
}