Infra: Switch csit-shim to fdiotools
[csit.git] / fdio.infra.terraform / 1n_nmd / minio / variables.tf
1 # Nomad
2 variable "nomad_datacenters" {
3   description = "Nomad data centers"
4   type        = list(string)
5   default     = [ "dc1" ]
6 }
7
8 variable "nomad_host_volume" {
9   description = "Nomad Host Volume"
10   type        = string
11   default     = "persistence"
12 }
13
14 # Minio
15 variable "minio_job_name" {
16   description = "Minio job name"
17   type        = string
18   default     = "minio"
19 }
20
21 variable "minio_service_name" {
22   description = "Minio service name"
23   type        = string
24   default     = "minio"
25 }
26
27 variable "minio_group_count" {
28   description = "Number of Minio group instances"
29   type        = number
30   default     = 1
31 }
32
33 variable "minio_host" {
34   description = "Minio host"
35   type        = string
36   default     = "127.0.0.1"
37 }
38
39 variable "minio_port" {
40   description = "Minio port"
41   type        = number
42   default     = 9000
43 }
44
45 variable "minio_cpu" {
46   description = "CPU allocation for Minio"
47   type        = number
48   default     = 40000
49 }
50
51 variable "minio_memory" {
52   description = "Memory allocation for Minio"
53   type        = number
54   default     = 40000
55 }
56
57 variable "minio_container_image" {
58   description = "Minio docker image"
59   type        = string
60   default     = "minio/minio:latest"
61 }
62
63 variable "minio_envs" {
64   description = "Minio environment variables"
65   type        = list(string)
66   default     = []
67 }
68
69 variable "minio_access_key" {
70   description = "Minio access key"
71   type        = string
72   default     = "minio"
73 }
74
75 variable "minio_secret_key" {
76   description = "Minio secret key"
77   type        = string
78   default     = "minio123"
79 }
80
81 variable "minio_data_dir" {
82   description = "Minio server data dir"
83   type        = string
84   default     = "/data/"
85 }
86
87 variable "minio_use_host_volume" {
88   description = "Use Nomad host volume feature"
89   type        = bool
90   default     = false
91 }
92
93 variable "minio_use_canary" {
94   description = "Uses canary deployment for Minio"
95   type        = bool
96   default     = false
97 }
98
99 variable "minio_vault_secret" {
100   description = "Set of properties to be able to fetch secret from vault"
101   type        = object({
102     use_vault_provider        = bool,
103     vault_kv_policy_name      = string,
104     vault_kv_path             = string,
105     vault_kv_field_access_key = string,
106     vault_kv_field_secret_key = string
107   })
108 }
109
110 variable "minio_resource_proxy" {
111   description = "Minio proxy resources"
112   type        = object({
113     cpu       = number,
114     memory    = number
115   })
116   default     = {
117     cpu       = 200,
118     memory    = 128
119   }
120   validation {
121     condition     = var.minio_resource_proxy.cpu >= 200 && var.minio_resource_proxy.memory >= 128
122     error_message = "Proxy resource must be at least: cpu=200, memory=128."
123   }
124 }
125
126 # MC
127 variable "mc_job_name" {
128   description = "Minio client job name"
129   type        = string
130   default     = "mc"
131 }
132
133 variable "mc_service_name" {
134   description = "Minio client service name"
135   type        = string
136   default     = "mc"
137 }
138
139 variable "mc_container_image" {
140   description = "Minio client docker image"
141   type        = string
142   default     = "minio/mc:latest"
143 }
144
145 variable "mc_envs" {
146   description = "Minio client environment variables"
147   type        = list(string)
148   default     = []
149 }
150
151 variable "minio_buckets" {
152   description = "List of buckets to create on startup"
153   type        = list(string)
154   default     = []
155 }
156
157 variable "minio_upstreams" {
158   description = "List of upstream services (list of object with service_name, port)"
159   type        = list(object({
160     service_name = string,
161     port         = number,
162   }))
163   default     = []
164 }
165
166 variable "mc_extra_commands" {
167   description = "Extra commands to run in MC container after creating buckets"
168   type        = list(string)
169   default     = [""]
170 }