-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
321 lines (268 loc) · 8.47 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
################################# Required Variables #################################
variable "cluster_custom_name" {
description = "The name of the EKS cluster"
type = string
}
variable "custom_ami_id" {
description = "The custom AMI ID to use for the EKS nodes"
type = string
default = ""
}
variable "env" {
description = "The environment name"
type = string
}
variable "ado" {
description = "The ado name"
type = string
}
variable "program_office" {
description = "The program office name"
type = string
}
################################# VPC Variables #################################
variable "domain_name" {
description = "The domain name to use for DNS"
type = string
}
variable "gold_image_date" {
description = "Gold Image Date in YYYY-MM format"
type = string
default = ""
validation {
condition = can(regex("^\\d{4}-(0[1-9]|1[0-2])$", var.gold_image_date)) || var.gold_image_date == ""
error_message = "gold_image_date must be in the YYYY-MM format."
}
}
variable "subnet_lookup_overrides" {
description = "Some Subnets don't follow standard naming conventions. Use this map to override the query used for looking up Subnets. Ex: { private = \"foo-west-nonpublic-*\" }"
default = {}
type = map(string)
}
variable "vpc_endpoint_lookup_overrides" {
description = "Some vpc endpoints don't follow standard naming conventions. Use this map to override the query used for looking up Subnets. Ex: { private = \"foo-west-nonpublic-*\" }"
default = ""
type = string
}
variable "vpc_lookup_override" {
description = "Some VPCs don't follow standard naming conventions. Use this to override the query used to lookup VPC names. Accepts wildcard in form of '*'"
default = ""
type = string
}
################################# EKS Variables #################################
variable "eks_access_entries" {
description = "The access entries to apply to the EKS cluster"
type = any
default = {}
validation {
condition = !contains(keys(var.eks_access_entries), "cluster_creator")
error_message = "The access entry name 'cluster_creator' is not allowed"
}
}
variable "eks_cluster_tags" {
description = "The tags to apply to the EKS cluster"
type = map(string)
default = {}
}
variable "eks_gp3_reclaim_policy" {
description = "The reclaim policy for the EKS gp3 volumes"
type = string
default = "Retain"
}
variable "eks_gp3_volume_binding_mode" {
description = "The volume binding mode for the EKS gp3 volumes"
type = string
default = "WaitForFirstConsumer"
}
variable "eks_main_nodes_desired_size" {
description = "The desired size of the main EKS node group"
type = number
default = 3
}
variable "eks_main_node_instance_types" {
description = "The instance types for the main EKS node group"
type = list(string)
default = ["c5.2xlarge"]
}
variable "eks_main_nodes_max_size" {
description = "The max size of the main EKS node group"
type = number
default = 3
}
variable "eks_main_nodes_min_size" {
description = "The min size of the main EKS node group"
type = number
default = 3
}
variable "eks_node_tags" {
description = "The tags to apply to the EKS nodes"
type = map(string)
default = {}
}
variable "eks_security_group_additional_rules" {
description = "Additional rules to add to the EKS node security group"
type = map(object({
description = optional(string)
protocol = string
type = string
from_port = number
to_port = number
cidr_blocks = optional(list(string))
ipv6_cidr_blocks = optional(list(string))
prefix_list_ids = optional(list(string))
source_cluster_security_group = optional(bool)
self = optional(bool)
}))
default = {}
}
variable "eks_version" {
description = "The version of the EKS cluster"
type = string
default = "1.30"
}
variable "is_prod_cluster" {
description = "Whether the EKS cluster is a production cluster"
type = bool
default = false
}
variable "node_bootstrap_extra_args" {
description = "Any extra arguments to pass to the bootstrap script for the EKS nodes"
type = string
default = ""
}
variable "node_pre_bootstrap_script" {
description = "The pre-bootstrap script to run on the EKS nodes"
type = string
default = ""
}
variable "node_post_bootstrap_script" {
description = "The post-bootstrap script to run on the EKS nodes"
type = string
default = ""
}
variable "node_labels" {
description = "The labels to apply to the EKS nodes"
type = map(string)
default = {}
}
variable "node_taints" {
description = "The taints to apply to the EKS nodes"
type = map(string)
default = {}
}
################################# EFS Variables #################################
variable "efs_availability_zone_name" {
description = "The availability zone for the EFS"
type = string
default = ""
}
variable "efs_directory_permissions" {
description = "The directory permissions for the EFS"
type = string
default = "0700"
}
variable "efs_encryption_enabled" {
description = "Enable encryption for the EFS"
type = bool
default = true
}
variable "efs_lifecycle_policy_transition_to_archive" {
description = "The transition to archive policy for the EFS"
type = string
default = "AFTER_180_DAYS"
}
variable "efs_lifecycle_policy_transition_to_ia" {
description = "The transition to IA policy for the EFS"
type = string
default = "AFTER_90_DAYS"
}
variable "efs_lifecycle_policy_transition_to_primary_storage_class" {
description = "The transition to primary storage class policy for the EFS"
type = string
default = "AFTER_1_ACCESS"
}
variable "efs_provisioned_throughput_in_mibps" {
description = "The provisioned throughput for the EFS"
type = number
default = 0
}
variable "efs_performance_mode" {
description = "The performance mode for the EFS"
type = string
default = "generalPurpose"
}
variable "efs_protection_replication_overwrite" {
description = "The replication overwrite protection for the EFS"
type = string
default = "DISABLED"
}
variable "efs_tags" {
description = "The tags to apply to the EFS"
type = map(string)
default = {}
}
variable "efs_throughput_mode" {
description = "The throughput mode for the EFS"
type = string
default = "bursting"
}
################################# Pod Identities #################################
variable "enable_eks_pod_identities" {
type = bool
default = true
}
variable "pod_identity_tags" {
description = "The tags to apply to the Pod Identities"
type = map(string)
default = {}
}
################################# ArgoCD Variables #################################
variable "argocd_chart_version" {
description = "ArgoCD helm chart version"
type = string
default = "7.3.6"
}
variable "argocd_use_sso" {
description = "Enable SSO for ArgoCD"
type = bool
default = false
}
variable "okta_client_id" {
description = "Okta Client ID for Setting up SSO for ArgoCD"
type = string
sensitive = true
default = ""
}
variable "okta_client_secret" {
description = "Okta Client Secret for Setting up SSO for ArgoCD"
type = string
sensitive = true
default = ""
}
variable "okta_issuer" {
description = "Okta OIDC Issuer for Setting up SSO for ArgoCD"
type = string
default = ""
}
################################# Karpenter Variables #################################
variable "kp_chart_version" {
description = "Karpenter helm chart version"
type = string
default = "0.37.0"
}
variable "karpenter_tags" {
description = "The tags to apply to the Karpenter deployment"
type = map(string)
default = {}
}
################################# S3 Variables #################################
variable "main_bucket_tags" {
description = "The tags to apply to the main bucket"
type = map(string)
default = {}
}
variable "logging_bucket_tags" {
description = "The tags to apply to the logging bucket"
type = map(string)
default = {}
}