generated from clowdhaus/terraform-aws-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
variables.tf
491 lines (412 loc) · 14.2 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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
variable "create" {
description = "Determines whether resources will be created (affects all resources)"
type = bool
default = true
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
################################################################################
# IAM Role Trust Policy
################################################################################
variable "trust_policy_conditions" {
description = "A list of conditions to add to the role trust policy"
type = any
default = []
}
variable "trust_policy_statements" {
description = "A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for the role trust policy"
type = any
default = []
}
################################################################################
# IAM Role
################################################################################
variable "name" {
description = "Name of IAM role"
type = string
default = ""
}
variable "use_name_prefix" {
description = "Determines whether the role name and policy name(s) are used as a prefix"
type = string
default = true
}
variable "path" {
description = "Path of IAM role"
type = string
default = "/"
}
variable "description" {
description = "IAM Role description"
type = string
default = null
}
variable "max_session_duration" {
description = "Maximum CLI/API session duration in seconds between 3600 and 43200"
type = number
default = null
}
variable "permissions_boundary_arn" {
description = "Permissions boundary ARN to use for IAM role"
type = string
default = null
}
variable "additional_policy_arns" {
description = "ARNs of additional policies to attach to the IAM role"
type = map(string)
default = {}
}
################################################################################
# Pod Identity Association
################################################################################
variable "association_defaults" {
description = "Default values used across all Pod Identity associations created unless a more specific value is provided"
type = any
default = {}
}
variable "associations" {
description = "Map of Pod Identity associations to be created (map of maps)"
type = any
default = {}
}
################################################################################
# Policies
################################################################################
variable "source_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document"
type = list(string)
default = []
}
variable "override_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document"
type = list(string)
default = []
}
variable "policy_statements" {
description = "A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage"
type = any
default = []
}
variable "policy_name_prefix" {
description = "IAM policy name prefix"
type = string
default = "AmazonEKS_"
}
# Custom policy
variable "attach_custom_policy" {
description = "Determines whether to attach the custom IAM policy to the role"
type = bool
default = false
}
variable "custom_policy_description" {
description = "Description of the custom IAM policy"
type = string
default = "Custom IAM Policy"
}
# Amazon Managed Service for Prometheus
variable "attach_amazon_managed_service_prometheus_policy" {
description = "Determines whether to attach the Amazon Managed Service for Prometheus IAM policy to the role"
type = bool
default = false
}
variable "amazon_managed_service_prometheus_policy_name" {
description = "Custom name of the Amazon Managed Service for Prometheus IAM policy"
type = string
default = null
}
variable "amazon_managed_service_prometheus_workspace_arns" {
description = "List of AMP Workspace ARNs to read and write metrics"
type = list(string)
default = []
}
# AWS Appmesh Controller
variable "attach_aws_appmesh_controller_policy" {
description = "Determines whether to attach the AppMesh Controller policy to the role"
type = bool
default = false
}
variable "appmesh_controller_policy_name" {
description = "Custom name of the AppMesh Controller IAM policy"
type = string
default = null
}
# AWS Cloudwatch Observability Agent
variable "attach_aws_cloudwatch_observability_policy" {
description = "Determines whether to attach the AWS Cloudwatch Observability IAM policy to the role"
type = bool
default = false
}
# AWS Appmesh envoy proxy
variable "attach_aws_appmesh_envoy_proxy_policy" {
description = "Determines whether to attach the AppMesh Envoy Proxy policy to the role"
type = bool
default = false
}
variable "appmesh_envoy_proxy_policy_name" {
description = "Custom name of the AppMesh Envoy Proxy IAM policy"
type = string
default = null
}
# AWS EBS CSI
variable "attach_aws_ebs_csi_policy" {
description = "Determines whether to attach the EBS CSI IAM policy to the role"
type = bool
default = false
}
variable "aws_ebs_csi_policy_name" {
description = "Custom name of the EBS CSI IAM policy"
type = string
default = null
}
variable "aws_ebs_csi_kms_arns" {
description = "KMS key ARNs to allow EBS CSI to manage encrypted volumes"
type = list(string)
default = []
}
# AWS EFS CSI
variable "attach_aws_efs_csi_policy" {
description = "Determines whether to attach the EFS CSI IAM policy to the role"
type = bool
default = false
}
variable "aws_efs_csi_policy_name" {
description = "Custom name of the EFS CSI IAM policy"
type = string
default = null
}
# AWS FSx Lustre CSI
variable "attach_aws_fsx_lustre_csi_policy" {
description = "Determines whether to attach the FSx for Lustre CSI Driver IAM policy to the role"
type = bool
default = false
}
variable "aws_fsx_lustre_csi_policy_name" {
description = "Custom name of the FSx for Lustre CSI Driver IAM policy"
type = string
default = null
}
variable "aws_fsx_lustre_csi_service_role_arns" {
description = "Service role ARNs to allow FSx for Lustre CSI create and manage FSX for Lustre service linked roles"
type = list(string)
default = []
}
# AWS Gateway Controller
variable "attach_aws_gateway_controller_policy" {
description = "Determines whether to attach the AWS Gateway Controller IAM policy to the role"
type = bool
default = false
}
variable "aws_gateway_controller_policy_name" {
description = "Custom name of the AWS Gateway Controller IAM policy"
type = string
default = null
}
# AWS Load Balancer Controller
variable "attach_aws_lb_controller_policy" {
description = "Determines whether to attach the AWS Load Balancer Controller policy to the role"
type = bool
default = false
}
variable "aws_lb_controller_policy_name" {
description = "Custom name of the AWS Load Balancer Controller IAM policy"
type = string
default = null
}
# AWS Load Balancer Controller TargetGroup Binding Only
variable "attach_aws_lb_controller_targetgroup_binding_only_policy" {
description = "Determines whether to attach the AWS Load Balancer Controller policy for the TargetGroupBinding only"
type = bool
default = false
}
variable "aws_lb_controller_targetgroup_only_policy_name" {
description = "Custom name of the AWS Load Balancer Controller IAM policy for the TargetGroupBinding only"
type = string
default = null
}
variable "aws_lb_controller_targetgroup_arns" {
description = "List of Target groups ARNs using Load Balancer Controller"
type = list(string)
default = []
}
# AWS Node termination handler
variable "attach_aws_node_termination_handler_policy" {
description = "Determines whether to attach the Node Termination Handler policy to the role"
type = bool
default = false
}
variable "aws_node_termination_handler_policy_name" {
description = "Custom name of the Node Termination Handler IAM policy"
type = string
default = null
}
variable "aws_node_termination_handler_sqs_queue_arns" {
description = "List of SQS ARNs that contain node termination events"
type = list(string)
default = []
}
# AWS Private CA Issuer
variable "attach_aws_privateca_issuer_policy" {
description = "Determines whether to attach the AWS Private CA Issuer IAM policy to the role"
type = bool
default = false
}
variable "aws_privateca_issuer_policy_name" {
description = "Custom name of the AWS Private CA Issuer IAM policy"
type = string
default = null
}
variable "aws_privateca_issuer_acmca_arns" {
description = "List of ACM Private CA ARNs to issue certificates from"
type = list(string)
default = []
}
# AWS VPC CNI
variable "attach_aws_vpc_cni_policy" {
description = "Determines whether to attach the VPC CNI IAM policy to the role"
type = bool
default = false
}
variable "aws_vpc_cni_policy_name" {
description = "Custom name of the VPC CNI IAM policy"
type = string
default = null
}
variable "aws_vpc_cni_enable_cloudwatch_logs" {
description = "Determines whether to enable VPC CNI permission to create CloudWatch Log groups and publish network policy events"
type = bool
default = false
}
variable "aws_vpc_cni_enable_ipv4" {
description = "Determines whether to enable IPv4 permissions for VPC CNI policy"
type = bool
default = false
}
variable "aws_vpc_cni_enable_ipv6" {
description = "Determines whether to enable IPv6 permissions for VPC CNI policy"
type = bool
default = false
}
# Cert Manager
variable "attach_cert_manager_policy" {
description = "Determines whether to attach the Cert Manager IAM policy to the role"
type = bool
default = false
}
variable "cert_manager_policy_name" {
description = "Custom name of the Cert Manager IAM policy"
type = string
default = null
}
variable "cert_manager_hosted_zone_arns" {
description = "Route53 hosted zone ARNs to allow Cert manager to manage records"
type = list(string)
default = []
}
# Cluster autoscaler
variable "attach_cluster_autoscaler_policy" {
description = "Determines whether to attach the Cluster Autoscaler IAM policy to the role"
type = bool
default = false
}
variable "cluster_autoscaler_policy_name" {
description = "Custom name of the Cluster Autoscaler IAM policy"
type = string
default = null
}
variable "cluster_autoscaler_cluster_names" {
description = "List of cluster names to appropriately scope permissions within the Cluster Autoscaler IAM policy"
type = list(string)
default = []
}
# External DNS
variable "attach_external_dns_policy" {
description = "Determines whether to attach the External DNS IAM policy to the role"
type = bool
default = false
}
variable "external_dns_policy_name" {
description = "Custom name of the External DNS IAM policy"
type = string
default = null
}
variable "external_dns_hosted_zone_arns" {
description = "Route53 hosted zone ARNs to allow External DNS to manage records"
type = list(string)
default = []
}
# External Secrets
variable "attach_external_secrets_policy" {
description = "Determines whether to attach the External Secrets policy to the role"
type = bool
default = false
}
variable "external_secrets_policy_name" {
description = "Custom name of the External Secrets IAM policy"
type = string
default = null
}
variable "external_secrets_ssm_parameter_arns" {
description = "List of Systems Manager Parameter ARNs that contain secrets to mount using External Secrets"
type = list(string)
default = []
}
variable "external_secrets_secrets_manager_arns" {
description = "List of Secrets Manager ARNs that contain secrets to mount using External Secrets"
type = list(string)
default = []
}
variable "external_secrets_kms_key_arns" {
description = "List of KMS Key ARNs that are used by Secrets Manager that contain secrets to mount using External Secrets"
type = list(string)
default = []
}
variable "external_secrets_create_permission" {
description = "Determines whether External Secrets has permission to create/delete secrets"
type = bool
default = false
}
# Mountpoint S3 CSI
variable "attach_mountpoint_s3_csi_policy" {
description = "Determines whether to attach the Mountpoint S3 CSI IAM policy to the role"
type = bool
default = false
}
variable "mountpoint_s3_csi_policy_name" {
description = "Custom name of the Mountpoint S3 CSI IAM policy"
type = string
default = null
}
variable "mountpoint_s3_csi_bucket_arns" {
description = "List of S3 Bucket ARNs that Mountpoint S3 CSI needs access to list"
type = list(string)
default = []
}
variable "mountpoint_s3_csi_bucket_path_arns" {
description = "S3 path ARNs to allow Mountpoint S3 CSI driver to manage items at the provided path(s). This is required if `attach_mountpoint_s3_csi_policy = true`"
type = list(string)
default = []
}
# Velero
variable "attach_velero_policy" {
description = "Determines whether to attach the Velero IAM policy to the role"
type = bool
default = false
}
variable "velero_policy_name" {
description = "Custom name of the Velero IAM policy"
type = string
default = null
}
variable "velero_s3_bucket_arns" {
description = "List of S3 Bucket ARNs that Velero needs access to list"
type = list(string)
default = []
}
variable "velero_s3_bucket_path_arns" {
description = "S3 path ARNs to allow Velero to manage items at the provided path(s). This is required if `attach_mountpoint_s3_csi_policy = true`"
type = list(string)
default = []
}