-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
168 lines (155 loc) · 3.85 KB
/
variables.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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
variable "name" {
description = "Name to give to the vm."
type = string
}
variable "hostname" {
description = "The hostname used for Vault configuration (api_addr and cluster_addr)"
type = string
}
variable "network_port" {
description = "Network port to assign to the node. Should be of type openstack_networking_port_v2"
type = any
}
variable "server_group" {
description = "Server group to assign to the node. Should be of type openstack_compute_servergroup_v2"
type = any
}
variable "image_source" {
description = "Source of the vm's image"
type = object({
image_id = string
volume_id = string
})
validation {
condition = (var.image_source.image_id != "" && var.image_source.volume_id == "") || (var.image_source.image_id == "" && var.image_source.volume_id != "")
error_message = "You must provide either an image_id or a volume_id, but not both."
}
}
variable "flavor_id" {
description = "ID of the VM flavor"
type = string
}
variable "keypair_name" {
description = "Name of the keypair that will be used by admins to ssh to the node"
type = string
}
variable "chrony" {
description = "Chrony configuration for ntp. If enabled, chrony is installed and configured, else the default image ntp settings are kept"
type = object({
enabled = bool,
//https://chrony.tuxfamily.org/doc/4.2/chrony.conf.html#server
servers = list(object({
url = string,
options = list(string)
})),
//https://chrony.tuxfamily.org/doc/4.2/chrony.conf.html#pool
pools = list(object({
url = string,
options = list(string)
})),
//https://chrony.tuxfamily.org/doc/4.2/chrony.conf.html#makestep
makestep = object({
threshold = number,
limit = number
})
})
default = {
enabled = false
servers = []
pools = []
makestep = {
threshold = 0,
limit = 0
}
}
}
variable "install_dependencies" {
description = "Whether to install all dependencies in cloud-init"
type = bool
default = true
}
variable "release_version" {
description = "Vault release version to install"
type = string
default = "1.13.1"
}
variable "tls" {
description = "Configuration for a secure vault communication over tls"
type = object({
ca_certificate = string
server_certificate = string
server_key = string
client_auth = bool
})
default = {
ca_certificate = ""
server_certificate = ""
server_key = ""
client_auth = false
}
}
variable "etcd_backend" {
description = "Parameters for the etcd backend"
type = object({
key_prefix = string
urls = string
ca_certificate = string
client = object({
certificate = string
key = string
username = string
password = string
})
})
default = {
key_prefix = ""
urls = ""
ca_certificate = ""
client = {
certificate = ""
key = ""
username = ""
password = ""
}
}
}
variable "fluentbit" {
description = "Fluent-bit configuration"
sensitive = true
type = object({
enabled = bool
containerd_tag = string
kubelet_tag = string
etcd_tag = string
node_exporter_tag = string
metrics = object({
enabled = bool
port = number
})
forward = object({
domain = string
port = number
hostname = string
shared_key = string
ca_cert = string
})
})
default = {
enabled = false
containerd_tag = ""
kubelet_tag = ""
etcd_tag = ""
node_exporter_tag = ""
metrics = {
enabled = false
port = 0
}
forward = {
domain = ""
port = 0
hostname = ""
shared_key = ""
ca_cert = ""
}
}
}