This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
generated from andreswebs/tf-module-cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 15
/
variables.tf
327 lines (272 loc) · 7.91 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
variable "cluster_oidc_provider" {
type = string
description = "OpenID Connect (OIDC) Identity Provider associated with the Kubernetes cluster"
default = ""
}
variable "k8s_namespace" {
type = string
description = "Name of the Kubernetes namespace to which resources will be deployed"
default = "monitoring"
}
variable "metrics_server_enabled" {
type = bool
description = "Enable Metrics Server?"
default = true
}
variable "prometheus_enabled" {
type = bool
description = "Enable Prometheus?"
default = true
}
variable "loki_enabled" {
type = bool
description = "Enable Loki?"
default = true
}
variable "grafana_enabled" {
type = bool
description = "Enable Grafana?"
default = true
}
variable "loki_mode" {
type = string
description = "Loki mode, must be either `single` or `distributed`"
default = "distributed"
validation {
condition = can(regex("^single|distributed$", var.loki_mode))
error_message = "Must be one of `single` or `distributed`."
}
}
variable "loki_aggregator" {
type = string
description = "Loki aggregator to install, must be either `promtail` or `fluent-bit`"
default = "promtail"
validation {
condition = can(regex("^promtail|fluent-bit", var.loki_aggregator))
error_message = "Must be one of `promtail` or `fluent-bit`."
}
}
variable "loki_iam_role_name" {
type = string
description = "Name of IAM role for Loki"
default = "loki"
}
variable "loki_compactor_iam_role_name" {
type = string
description = "Name of IAM role for Loki Compactor"
default = "loki-compactor"
}
variable "create_loki_storage" {
type = bool
description = "Create S3 bucket for Loki storage?"
default = false
}
variable "create_loki_storage_id_suffix" {
type = bool
description = "Append a random identifier string suffix to the Loki storage S3 bucket name?"
default = false
}
variable "create_loki_storage_kms_key" {
type = bool
description = "Create KMS key?"
default = true
}
variable "loki_storage_s3_bucket_name" {
type = string
description = "Name of S3 bucket used for Loki storage"
default = ""
}
variable "loki_storage_s3_force_destroy" {
type = bool
description = "Force destroy bucket when running `terraform destroy`?"
default = false
}
variable "loki_storage_kms_key_arn" {
type = string
description = "(Optional) ARN of KMS key used to encrypt bucket objects; ignored if `create_kms_key` is set to `true`"
default = null
}
variable "loki_storage_kms_key_deletion_window_in_days" {
type = number
description = "KMS key deletion window in days"
default = 30
}
variable "loki_storage_kms_key_enable_rotation" {
type = bool
description = "Enable KMS key rotation?"
default = true
}
variable "loki_storage_expiration_days" {
type = number
description = "Number of days to retain objects; `0` means never expire"
default = 90
}
variable "loki_service_account_name" {
type = string
description = "Name of the Kubernetes service account for Loki components"
default = "loki"
}
variable "loki_compactor_service_account_name" {
type = string
description = "Name of the Kubernetes service account for the Loki compactor"
default = "loki-compactor"
}
variable "grafana_service_account_name" {
type = string
description = "Name of the Kubernetes service account for Grafana"
default = "grafana"
}
variable "grafana_iam_role_name" {
type = string
description = "Name of IAM role for Grafana"
default = "grafana"
}
## chart versions
variable "chart_version_metrics_server" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_prometheus" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_promtail" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_loki_distributed" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_grafana" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_fluent_bit" {
type = string
description = "Chart version"
default = null
}
variable "chart_version_loki" {
type = string
description = "Chart version"
default = null
}
## end chart versions
## helm
variable "helm_release_name_metrics_server" {
type = string
description = "Release name"
default = "metrics-server"
}
variable "helm_release_name_prometheus" {
type = string
description = "Release name"
default = "prometheus"
}
variable "helm_release_name_grafana" {
type = string
description = "Release name"
default = "grafana"
}
variable "helm_release_name_loki" {
type = string
description = "Release name"
default = "loki"
}
variable "helm_release_name_promtail" {
type = string
description = "Release name"
default = "promtail"
}
variable "helm_release_name_fluent_bit" {
type = string
description = "Release name"
default = "fluent-bit"
}
variable "helm_max_history" {
type = number
description = "Maximum number of release versions stored per release; `0` means no limit"
default = 3
}
variable "helm_timeout_seconds" {
type = number
description = "Time in seconds to wait for any individual kubernetes operation"
default = 300
}
variable "helm_recreate_pods" {
type = bool
description = "Perform pods restart during upgrade/rollback ?"
default = true
}
variable "helm_atomic_creation" {
type = bool
description = "Purge resources on installation failure ? The wait flag will be set automatically if atomic is used"
default = true
}
variable "helm_cleanup_on_fail" {
type = bool
description = "Deletion new resources created in this upgrade if the upgrade fails ?"
default = true
}
variable "helm_wait_for_completion" {
type = bool
description = "Wait until all resources are in a ready state before marking the release as successful ?"
default = true
}
variable "helm_wait_for_jobs" {
type = bool
description = "Wait until all Jobs have been completed before marking the release as successful ?"
default = true
}
variable "helm_verify" {
type = bool
description = "Verify the package before installing it. Helm uses a provenance file to verify the integrity of the chart"
default = false
}
variable "helm_keyring" {
type = string
description = "Location of public keys used for verification; used only if verify is true"
default = ".gnupg/pubring.gpg"
}
variable "helm_reuse_values" {
type = bool
description = "When upgrading, reuse the last release's values and merge any overrides ? If 'reset_values' is specified, this is ignored"
default = false
}
variable "helm_reset_values" {
type = bool
description = "When upgrading, reset the values to the ones built into the chart ?"
default = false
}
variable "helm_force_update" {
type = bool
description = "Force resource update through delete/recreate if needed ?"
default = false
}
variable "helm_create_namespace" {
type = bool
description = "Create the namespace if it does not yet exist ?"
default = true
}
variable "helm_replace" {
type = bool
description = "Re-use the given name, even if that name is already used; this is unsafe in production"
default = false
}
variable "helm_dependency_update" {
type = bool
description = "Run helm dependency update before installing the chart ?"
default = false
}
variable "helm_skip_crds" {
type = bool
description = "Skip installing CRDs ?"
default = false
}
## end helm