-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
346 lines (285 loc) · 9.99 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
##################################################################################
## Generic
##################################################################################
variable "cluster_name" {
description = "Cluster name"
type = string
}
variable "cluster_oidc_issuer_url" {
description = "The oidc url of the eks cluster"
type = string
}
variable "aws_region" {
description = "EKS Cluster region"
type = string
}
variable "aws_account_id" {
description = "AWS Account ID"
type = string
}
variable "tags" {
type = map(string)
default = {}
description = "AWS Tags common to all the resources created"
}
##################################################################################
## network
##################################################################################
variable "vpc_id" {
type = string
description = "AWS VPC to deploy Truefoundry rds"
}
##################################################################################
## Database
##################################################################################
variable "truefoundry_db_enabled" {
type = bool
description = "variable to enable/disable truefoundry db creation"
default = true
}
variable "truefoundry_db_database_name" {
type = string
description = "Name of the database in DB"
default = "ctl"
}
variable "truefoundry_db_ingress_security_group" {
type = string
description = "SG allowed to connect to the database"
default = ""
validation {
condition = var.truefoundry_db_enabled ? var.truefoundry_db_ingress_security_group != "" : true
error_message = "truefoundry_db_ingress_security_group is required when truefoundry_db_enabled is true"
}
}
variable "truefoundry_db_ingress_cidr_blocks" {
type = list(string)
description = "CIDR blocks allowed to connect to the database"
default = []
}
variable "truefoundry_db_subnet_ids" {
type = list(string)
description = "List of subnets where the RDS database will be deployed"
default = []
validation {
condition = var.truefoundry_db_enabled ? length(var.truefoundry_db_subnet_ids) > 0 : true
error_message = "truefoundry_db_subnet_ids is required when truefoundry_db_enabled is true"
}
}
variable "truefoundry_db_instance_class" {
type = string
description = "Instance class for RDS"
default = "db.t3.medium"
}
variable "truefoundry_db_publicly_accessible" {
type = string
default = false
description = "Make database publicly accessible. Subnets and SG must match"
}
variable "truefoundry_db_backup_retention_period" {
type = number
default = 14
description = "Backup retention period for RDS"
}
variable "truefoundry_db_allocated_storage" {
type = string
description = "Storage for RDS. Minimum storage allowed for gp3 volumes is 20GB"
default = "20"
}
variable "truefoundry_db_max_allocated_storage" {
type = string
description = "Max allowed storage for RDS when autoscaling is enabled"
default = "30"
}
variable "truefoundry_db_storage_type" {
type = string
description = "Storage type for truefoundry db"
default = "gp3"
}
variable "truefoundry_db_storage_iops" {
type = number
description = "Provisioned IOPS for the db"
default = 0
}
variable "truefoundry_db_skip_final_snapshot" {
type = bool
default = false
}
variable "truefoundry_db_deletion_protection" {
type = bool
default = true
}
variable "truefoundry_db_storage_encrypted" {
type = bool
default = true
}
variable "truefoundry_db_engine_version" {
default = "13.15"
type = string
description = "Truefoundry DB Postgres version"
}
variable "truefoundry_db_enable_override" {
description = "Enable override for truefoundry db name. You must pass truefoundry_db_override_name"
type = bool
default = false
}
variable "truefoundry_db_override_name" {
description = "Override name for truefoundry db.This is the name of the RDS resources in AWS . truefoundry_db_enable_override must be set true"
type = string
default = ""
validation {
condition = length(var.truefoundry_db_override_name) <= 63
error_message = "Error: DB Instance name is too long."
}
}
variable "truefoundry_db_enable_insights" {
description = "Enable insights to truefoundry db"
type = bool
default = false
}
variable "truefoundry_cloudwatch_log_exports" {
description = "Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported"
type = list(string)
default = ["postgresql", "upgrade"]
}
variable "truefoundry_db_multiple_az" {
description = "Enable Multi-az (standby) instances for RDS instances"
type = bool
default = false
}
variable "iam_database_authentication_enabled" {
description = "Enable IAM database authentication"
type = bool
default = false
}
variable "manage_master_user_password" {
description = "Enable master user password management. If set to true master user management is done by RDS in secrets manager, if false a random password is generated"
type = bool
default = false
}
variable "manage_master_user_password_rotation" {
description = "Enable master user password rotation"
type = bool
default = false
}
variable "master_user_password_rotate_immediately" {
description = "Rotate master user password immediately"
type = bool
default = false
}
variable "master_user_password_rotation_automatically_after_days" {
description = "Rotate master user password automatically after days"
type = number
default = 90
}
variable "master_user_password_rotation_duration" {
description = "Master user password rotation duration"
type = string
default = "3h"
}
##################################################################################
## Mlfoundry bucket
##################################################################################
variable "truefoundry_s3_enabled" {
type = bool
description = "variable to enable/disable truefoundry s3 bucket creation"
default = true
}
variable "truefoundry_s3_enable_override" {
description = "Enable override for s3 bucket name. You must pass truefoundry_s3_override_name"
type = bool
default = false
}
variable "truefoundry_s3_override_name" {
description = "Override name for s3 bucket. truefoundry_s3_enable_override must be set true"
type = string
default = ""
validation {
condition = length(var.truefoundry_s3_override_name) <= 63
error_message = "Error: Bucket name is too long."
}
}
variable "truefoundry_artifact_buckets_will_read" {
description = "A list of bucket IDs mlfoundry will need read access to, in order to show the stored artifacts. It accepts any valid IAM resource, including ARNs with wildcards, so you can do something like arn:aws:s3:::bucket-prefix-*"
type = list(string)
default = []
}
variable "truefoundry_s3_encryption_algorithm" {
description = "Algorithm used for encrypting the default bucket."
type = string
default = "AES256"
}
variable "truefoundry_s3_force_destroy" {
description = "Force destroy for mlfoundry s3 bucket"
default = false
type = bool
}
variable "truefoundry_s3_encryption_key_arn" {
description = "ARN of the key used to encrypt the bucket. Only needed if you set aws:kms as encryption algorithm."
type = string
default = null
}
variable "truefoundry_s3_cors_origins" {
description = "List of CORS origins for Mlfoundry bucket"
type = list(string)
default = ["*"]
}
##################################################################################
## MLfoundry service account
##################################################################################
variable "mlfoundry_k8s_service_account" {
description = "The k8s mlfoundry service account name"
type = string
default = "mlfoundry-server"
}
variable "mlfoundry_k8s_namespace" {
description = "The k8s mlfoundry namespace"
type = string
default = "truefoundry"
}
##################################################################################
## Servicefoundry service account
##################################################################################
variable "svcfoundry_k8s_service_account" {
description = "The k8s svcfoundry service account name"
type = string
default = "servicefoundry-server"
}
variable "svcfoundry_k8s_namespace" {
description = "The k8s svcfoundry namespace"
type = string
default = "truefoundry"
}
##################################################################################
## TFy workflow admin service account
##################################################################################
variable "tfy_workflow_admin_k8s_service_account" {
description = "The k8s tfy workflow admin service account name"
type = string
default = "tfy-workflow-admin"
}
variable "tfy_workflow_admin_k8s_namespace" {
description = "The k8s tfy workflow admin namespace"
type = string
default = "truefoundry"
}
##################################################################################
## Truefoundry service account
##################################################################################
variable "truefoundry_service_account" {
description = "Truefoundry k8s service name"
type = string
default = "truefoundry"
}
variable "truefoundry_k8s_namespace" {
description = "Truefoundry k8s namespace"
type = string
default = "truefoundry"
}
##################################################################################
## IAM role
##################################################################################
variable "truefoundry_iam_role_enabled" {
default = true
type = bool
description = "variable to enable/disable truefoundry iam role creation"
}