Skip to content

Commit 5e47e69

Browse files
authored
feat: Add nullable = false to variables that have a non-null or non-empty string value (#10)
1 parent 54d440d commit 5e47e69

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

variables.tf

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ variable "create" {
22
description = "Controls if resources should be created (affects all resources)"
33
type = bool
44
default = true
5+
nullable = false
56
}
67

78
variable "region" {
@@ -14,6 +15,7 @@ variable "tags" {
1415
description = "A map of tags to add to all resources"
1516
type = map(string)
1617
default = {}
18+
nullable = false
1719
}
1820

1921
################################################################################
@@ -24,6 +26,7 @@ variable "create_release" {
2426
description = "Determines whether the Helm release is created"
2527
type = bool
2628
default = true
29+
nullable = false
2730
}
2831

2932
variable "atomic" {
@@ -109,6 +112,7 @@ variable "max_history" {
109112
description = "Maximum number of release versions stored per release. Defaults to `5`"
110113
type = number
111114
default = 5
115+
nullable = false
112116
}
113117

114118
variable "name" {
@@ -127,6 +131,7 @@ variable "pass_credentials" {
127131
description = "Pass credentials to all domains. Defaults to `true`"
128132
type = bool
129133
default = true
134+
nullable = false
130135
}
131136

132137
variable "postrender" {
@@ -272,6 +277,7 @@ variable "upgrade_install" {
272277
description = " If true, the provider will install the release at the specified version even if a release not controlled by the provider is present: this is equivalent to running 'helm upgrade --install' with the Helm CLI. Defaults to `true`"
273278
type = bool
274279
default = true
280+
nullable = false
275281
}
276282

277283
variable "values" {
@@ -296,6 +302,7 @@ variable "wait" {
296302
description = "Will wait until all resources are in a ready state before marking the release as successful. If set to `true`, it will wait for as long as `timeout`. If set to `null` fallback on `300s` timeout. Defaults to `false`"
297303
type = bool
298304
default = false
305+
nullable = false
299306
}
300307

301308
variable "wait_for_jobs" {
@@ -329,12 +336,14 @@ variable "role_name_use_prefix" {
329336
description = "Determines whether the IAM role name (`role_name`) is used as a prefix"
330337
type = bool
331338
default = true
339+
nullable = false
332340
}
333341

334342
variable "role_path" {
335343
description = "Path of IAM role"
336344
type = string
337345
default = "/"
346+
nullable = false
338347
}
339348

340349
variable "role_permissions_boundary_arn" {
@@ -353,6 +362,7 @@ variable "role_policies" {
353362
description = "Policies to attach to the IAM role in `{'static_name' = 'policy_arn'}` format"
354363
type = map(string)
355364
default = {}
365+
nullable = false
356366
}
357367

358368
variable "max_session_duration" {
@@ -365,6 +375,7 @@ variable "assume_role_condition_test" {
365375
description = "Name of the [IAM condition operator](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html) to evaluate when assuming the role"
366376
type = string
367377
default = "StringEquals"
378+
nullable = false
368379
}
369380

370381
variable "irsa_oidc_providers" {
@@ -384,7 +395,8 @@ variable "trust_policy_conditions" {
384395
values = list(string)
385396
variable = string
386397
}))
387-
default = []
398+
default = []
399+
nullable = false
388400
}
389401

390402
################################################################################
@@ -395,18 +407,21 @@ variable "create_policy" {
395407
description = "Whether to create an IAM policy that is attached to the IAM role created"
396408
type = bool
397409
default = true
410+
nullable = false
398411
}
399412

400413
variable "source_policy_documents" {
401414
description = "List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s"
402415
type = list(string)
403416
default = []
417+
nullable = false
404418
}
405419

406420
variable "override_policy_documents" {
407421
description = "List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`"
408422
type = list(string)
409423
default = []
424+
nullable = false
410425
}
411426

412427
variable "policy_statements" {
@@ -445,6 +460,7 @@ variable "policy_name_use_prefix" {
445460
description = "Determines whether the IAM policy name (`policy_name`) is used as a prefix"
446461
type = bool
447462
default = true
463+
nullable = false
448464
}
449465

450466
variable "policy_path" {
@@ -467,6 +483,7 @@ variable "enable_pod_identity" {
467483
description = "Whether to add a trust relationship for EKS Pod Identity (pods.eks.amazonaws.com)"
468484
type = bool
469485
default = false
486+
nullable = false
470487
}
471488

472489
variable "pod_identity_associations" {
@@ -480,7 +497,8 @@ variable "pod_identity_associations" {
480497
target_role_arn = optional(string)
481498
tags = optional(map(string), {})
482499
}))
483-
default = {}
500+
default = {}
501+
nullable = false
484502
}
485503

486504
variable "pod_identity_association_defaults" {
@@ -494,5 +512,6 @@ variable "pod_identity_association_defaults" {
494512
target_role_arn = optional(string)
495513
tags = optional(map(string), {})
496514
})
497-
default = {}
515+
default = {}
516+
nullable = false
498517
}

0 commit comments

Comments
 (0)