generated from Skatteetaten/vagrant-hashistack-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
variables.tf
192 lines (169 loc) · 4.35 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
# Nomad
variable "nomad_datacenters" {
type = list(string)
description = "Nomad data centers"
default = ["dc1"]
}
variable "nomad_namespace" {
type = string
description = "[Enterprise] Nomad namespace"
default = "default"
}
variable "nomad_host_volume" {
type = string
description = "Nomad Host Volume"
default = "persistence"
}
variable "consul_tags" {
type = list(string)
description = "List of tags for services announces in consul service catalog"
default = [""]
}
# Minio
variable "service_name" {
type = string
description = "Minio service name"
default = "minio"
}
variable "host" {
type = string
description = "Minio host"
default = "127.0.0.1"
}
variable "port" {
type = number
description = "Minio port"
default = 9000
}
variable "cpu" {
type = number
description = "CPU allocation for Minio"
default = 200
}
variable "memory" {
type = number
description = "Memory allocation for Minio"
default = 1024
}
variable "container_image" {
type = string
description = "Minio docker image"
default = "minio/minio:latest"
}
variable "access_key" {
type = string
description = "Minio access key"
default = "minio"
}
variable "secret_key" {
type = string
description = "Minio secret key"
default = "minio123"
}
variable "data_dir" {
type = string
description = "Minio server data dir"
default = "/minio/data"
}
variable "container_environment_variables" {
type = list(string)
description = "Additional minio container environment variables"
default = []
}
variable "use_host_volume" {
type = bool
description = "Switch for nomad jobs to use host volume feature"
default = false
}
variable "use_canary" {
type = bool
description = "Uses canary deployment for Minio"
default = false
}
variable "vault_secret" {
type = object({
use_vault_provider = bool,
vault_kv_policy_name = string,
vault_kv_path = string,
vault_kv_field_access_key = string,
vault_kv_field_secret_key = string
})
description = "Set of properties to be able to fetch secret from vault"
default = {
use_vault_provider = true
vault_kv_policy_name = "kv-secret"
vault_kv_path = "secret/data/minio"
vault_kv_field_access_key = "access_key"
vault_kv_field_secret_key = "secret_key"
}
}
variable "vault_secret_old_version" {
type = number
default = -1
description = "Version of secret KV which has old value of root secrets. Used to rollover root secret"
}
# MC
variable "mc_service_name" {
type = string
description = "Minio client service name"
default = "mc"
}
variable "mc_container_image" {
type = string
description = "Minio client docker image"
default = "minio/mc:latest"
}
variable "mc_container_environment_variables" {
type = list(string)
description = "Minio client environment variables"
default = []
}
variable "buckets" {
type = list(string)
description = "List of buckets to create on startup"
default = []
}
variable "minio_upstreams" {
type = list(object({
service_name = string,
port = number,
}))
description = "List of upstream services (list of object with service_name, port)"
default = []
}
variable "resource_proxy" {
type = object({
cpu = number,
memory = number
})
default = {
cpu = 200,
memory = 128
}
description = "Minio proxy resources"
validation {
condition = var.resource_proxy.cpu >= 200 && var.resource_proxy.memory >= 128
error_message = "Proxy resource must be at least: cpu=200, memory=128."
}
}
variable "mc_extra_commands" {
type = list(string)
default = [""]
description = "Extra commands to run in MC container after creating buckets"
}
# KMS related
variable "kms_variables" {
type = object({
use_vault_kms = string
vault_address = string,
vault_kms_approle_kv = string,
vault_kms_key_name = string
})
description = "Set of properties to be able to transit secrets in vault"
default = {
use_vault_kms = false
vault_address = "",
vault_kms_approle_kv = "",
vault_kms_key_name = ""
}
}