6fb351df26a513ee93703caebef2fad2b1d9c5e0
[csit.git] / fdio.infra.terraform / 1n_nmd / minio_s3_gateway / variables.tf
1 # Nomad
2
3 variable "datacenters" {
4   description = "Specifies the list of DCs to be considered placing this task"
5   type        = list(string)
6   default     = ["dc1"]
7 }
8
9 variable "region" {
10   description = "Specifies the list of DCs to be considered placing this task"
11   type        = string
12   default     = "global"
13 }
14
15 variable "volume_source" {
16   description = "The name of the volume to request"
17   type        = string
18   default     = "persistence"
19 }
20
21 # Minio
22 variable "access_key" {
23   description = "Minio access key"
24   type        = string
25   default     = "minio"
26 }
27
28 variable "auto_promote" {
29   description = "Specifies if the job should auto-promote to the canary version"
30   type        = bool
31   default     = true
32 }
33
34 variable "auto_revert" {
35   description = "Specifies if the job should auto-revert to the last stable job"
36   type        = bool
37   default     = true
38 }
39
40 variable "canary" {
41   description = "Equal to the count of the task group allows blue/green depl."
42   type        = number
43   default     = 1
44 }
45
46 variable "cpu" {
47   description = "Specifies the CPU required to run this task in MHz"
48   type        = number
49   default     = 1000
50 }
51
52 variable "envs" {
53   description = "Minio environment variables"
54   type        = list(string)
55   default     = []
56 }
57
58 variable "group_count" {
59   description = "Specifies the number of the task groups running under this one"
60   type        = number
61   default     = 1
62 }
63
64 variable "host" {
65   description = "Minio host"
66   type        = string
67   default     = "127.0.0.1"
68 }
69
70 variable "image" {
71   description = "The Docker image to run"
72   type        = string
73   default     = "minio/minio:latest"
74 }
75
76 variable "job_name" {
77   description = "Specifies a name for the job"
78   type        = string
79   default     = "minio"
80 }
81
82 variable "kms_variables" {
83   type = object({
84     use_vault_kms        = string
85     vault_address        = string,
86     vault_kms_approle_kv = string,
87     vault_kms_key_name   = string
88   })
89   description = "Set of properties to be able to transit secrets in vault"
90   default = {
91     use_vault_kms        = false
92     vault_address        = "",
93     vault_kms_approle_kv = "",
94     vault_kms_key_name   = ""
95   }
96 }
97
98 variable "max_parallel" {
99   description = "Specifies the maximum number of updates to perform in parallel"
100   type        = number
101   default     = 1
102 }
103
104 variable "memory" {
105   description = "Specifies the memory required in MB"
106   type        = number
107   default     = 1024
108 }
109
110 variable "mode" {
111   description = "Specifies the Minio mode"
112   type        = string
113   default     = "server"
114 }
115
116 variable "port_base" {
117   description = "Specifies the static TCP/UDP port to allocate"
118   type        = number
119   default     = 9000
120 }
121
122 variable "port_console" {
123   description = "Specifies the static TCP/UDP port to allocate"
124   type        = number
125   default     = 9001
126 }
127
128 variable "resource_proxy" {
129   description = "Minio proxy resources"
130   type = object({
131     cpu    = number,
132     memory = number
133   })
134   default = {
135     cpu    = 2000,
136     memory = 1024
137   }
138   validation {
139     condition     = var.resource_proxy.cpu >= 200 && var.resource_proxy.memory >= 128
140     error_message = "Proxy resource must be at least: cpu=200, memory=128."
141   }
142 }
143
144 variable "service_name" {
145   description = "Specifies the name this service will be advertised in Consul"
146   type        = string
147   default     = "minio"
148 }
149
150 variable "secret_key" {
151   description = "Minio secret key"
152   type        = string
153   default     = "minio"
154 }
155
156 variable "upstreams" {
157   type = list(object({
158     service_name = string,
159     port         = number,
160   }))
161   description = "List of upstream services"
162   default     = []
163 }
164
165 variable "use_canary" {
166   description = "Uses canary deployment for Minio"
167   type        = bool
168   default     = false
169 }
170
171 variable "use_host_volume" {
172   description = "Use Nomad host volume feature"
173   type        = bool
174   default     = false
175 }
176
177 variable "vault_secret" {
178   type = object({
179     use_vault_provider        = bool,
180     vault_kv_policy_name      = string,
181     vault_kv_path             = string,
182     vault_kv_field_access_key = string,
183     vault_kv_field_secret_key = string
184   })
185   description = "Set of properties to be able to fetch secret from vault"
186   default = {
187     use_vault_provider        = false
188     vault_kv_policy_name      = "kv"
189     vault_kv_path             = "secret/data/minio"
190     vault_kv_field_access_key = "access_key"
191     vault_kv_field_secret_key = "secret_key"
192   }
193 }
194
195 variable "volume_destination" {
196   description = "Specifies where the volume should be mounted inside the task"
197   type        = string
198   default     = "/data/"
199 }