aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/1n_nmd/minio_s3_gateway/variables.tf
blob: b9f790b01f544882cb96ad5748794a1540f7ac0c (plain)
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
# Nomad

variable "datacenters" {
  description = "Specifies the list of DCs to be considered placing this task"
  type        = list(string)
  default     = ["dc1"]
}

variable "region" {
  description = "Specifies the list of DCs to be considered placing this task"
  type        = string
  default     = "global"
}

variable "volume_source" {
  description = "The name of the volume to request"
  type        = string
  default     = "persistence"
}

# Minio
variable "access_key" {
  description = "Minio access key"
  type        = string
  default     = "minio"
}

variable "auto_promote" {
  description = "Specifies if the job should auto-promote to the canary version"
  type        = bool
  default     = true
}

variable "auto_revert" {
  description = "Specifies if the job should auto-revert to the last stable job"
  type        = bool
  default     = true
}

variable "canary" {
  description = "Equal to the count of the task group allows blue/green depl."
  type        = number
  default     = 1
}

variable "cpu" {
  description = "Specifies the CPU required to run this task in MHz"
  type        = number
  default     = 1000
}

variable "envs" {
  description = "Minio environment variables"
  type        = list(string)
  default     = []
}

variable "group_count" {
  description = "Specifies the number of the task groups running under this one"
  type        = number
  default     = 1
}

variable "host" {
  description = "Minio host"
  type        = string
  default     = "127.0.0.1"
}

variable "image" {
  description = "The Docker image to run"
  type        = string
  default     = "minio/minio:latest"
}

variable "job_name" {
  description = "Specifies a name for the job"
  type        = string
  default     = "minio"
}

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   = ""
  }
}

variable "max_parallel" {
  description = "Specifies the maximum number of updates to perform in parallel"
  type        = number
  default     = 1
}

variable "memory" {
  description = "Specifies the memory required in MB"
  type        = number
  default     = 1024
}

variable "mode" {
  description = "Specifies the Minio mode"
  type        = string
  default     = "server"
}

variable "port_base" {
  description = "Specifies the static TCP/UDP port to allocate"
  type        = number
  default     = 9000
}

variable "port_console" {
  description = "Specifies the static TCP/UDP port to allocate"
  type        = number
  default     = 9001
}

variable "resource_proxy" {
  description = "Minio proxy resources"
  type = object({
    cpu    = number,
    memory = number
  })
  default = {
    cpu    = 2000,
    memory = 1024
  }
  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 "service_name" {
  description = "Specifies the name this service will be advertised in Consul"
  type        = string
  default     = "AKIAVWHHCAXZJUHH7QFN"
}

variable "secret_key" {
  description = "Minio secret key"
  type        = string
  default     = "SUSnhzMhoZTqteGJeGM7ry8cmL95fhksRloeL55j"
}

variable "upstreams" {
  type = list(object({
    service_name = string,
    port         = number,
  }))
  description = "List of upstream services"
  default     = []
}

variable "use_canary" {
  description = "Uses canary deployment for Minio"
  type        = bool
  default     = false
}

variable "use_host_volume" {
  description = "Use Nomad host volume feature"
  type        = bool
  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        = false
    vault_kv_policy_name      = "kv"
    vault_kv_path             = "secret/data/minio"
    vault_kv_field_access_key = "access_key"
    vault_kv_field_secret_key = "secret_key"
  }
}

variable "volume_destination" {
  description = "Specifies where the volume should be mounted inside the task"
  type        = string
  default     = "/data/"
}