diff --git a/README.md b/README.md index 473999e..ec22fdd 100644 --- a/README.md +++ b/README.md @@ -384,8 +384,8 @@ We are grateful to the community for contributing bugfixes and improvements! Ple |------|-------------|------|---------|:--------:| | [access\_entries](#input\_access\_entries) | Map of access entries to add to the cluster |
map(object({
# Access entry
kubernetes_groups = optional(list(string))
principal_arn = string
type = optional(string, "STANDARD")
user_name = optional(string)
tags = optional(map(string), {})
# Access policy association
policy_associations = optional(map(object({
policy_arn = string
access_scope = object({
namespaces = optional(list(string))
type = string
})
})), {})
})) | `{}` | no |
| [additional\_security\_group\_ids](#input\_additional\_security\_group\_ids) | List of additional, externally created security group IDs to attach to the cluster control plane | `list(string)` | `[]` | no |
-| [addons](#input\_addons) | Map of cluster addon configurations to enable for the cluster. Addon name can be the map keys or set with `name` | map(object({
name = optional(string) # will fall back to map key
before_compute = optional(bool, false)
most_recent = optional(bool, true)
addon_version = optional(string)
configuration_values = optional(string)
pod_identity_association = optional(list(object({
role_arn = string
service_account = string
})))
preserve = optional(bool, true)
resolve_conflicts_on_create = optional(string, "NONE")
resolve_conflicts_on_update = optional(string, "OVERWRITE")
service_account_role_arn = optional(string)
timeouts = optional(object({
create = optional(string)
update = optional(string)
delete = optional(string)
}))
tags = optional(map(string), {})
})) | `null` | no |
-| [addons\_timeouts](#input\_addons\_timeouts) | Create, update, and delete timeout configurations for the cluster addons | object({
create = optional(string)
update = optional(string)
delete = optional(string)
}) | `null` | no |
+| [addons](#input\_addons) | Map of cluster addon configurations to enable for the cluster. Addon name can be the map keys or set with `name` | map(object({
name = optional(string) # will fall back to map key
before_compute = optional(bool, false)
most_recent = optional(bool, true)
addon_version = optional(string)
configuration_values = optional(string)
pod_identity_association = optional(list(object({
role_arn = string
service_account = string
})))
preserve = optional(bool, true)
resolve_conflicts_on_create = optional(string, "NONE")
resolve_conflicts_on_update = optional(string, "OVERWRITE")
service_account_role_arn = optional(string)
timeouts = optional(object({
create = optional(string)
update = optional(string)
delete = optional(string)
}), {})
tags = optional(map(string), {})
})) | `null` | no |
+| [addons\_timeouts](#input\_addons\_timeouts) | Create, update, and delete timeout configurations for the cluster addons | object({
create = optional(string)
update = optional(string)
delete = optional(string)
}) | `{}` | no |
| [attach\_encryption\_policy](#input\_attach\_encryption\_policy) | Indicates whether or not to attach an additional policy for the cluster IAM role to utilize the encryption key provided | `bool` | `true` | no |
| [authentication\_mode](#input\_authentication\_mode) | The authentication mode for the cluster. Valid values are `CONFIG_MAP`, `API` or `API_AND_CONFIG_MAP` | `string` | `"API_AND_CONFIG_MAP"` | no |
| [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
diff --git a/main.tf b/main.tf
index d66cf3d..8ea8629 100644
--- a/main.tf
+++ b/main.tf
@@ -785,9 +785,9 @@ resource "aws_eks_addon" "this" {
service_account_role_arn = each.value.service_account_role_arn
timeouts {
- create = try(coalesce(each.value.timeouts.create, var.addons_timeouts.create), null)
- update = try(coalesce(each.value.timeouts.update, var.addons_timeouts.update), null)
- delete = try(coalesce(each.value.timeouts.delete, var.addons_timeouts.delete), null)
+ create = each.value.timeouts.create != null ? each.value.timeouts.create : var.addons_timeouts.create
+ update = each.value.timeouts.update != null ? each.value.timeouts.update : var.addons_timeouts.update
+ delete = each.value.timeouts.delete != null ? each.value.timeouts.delete : var.addons_timeouts.delete
}
tags = merge(
@@ -830,9 +830,9 @@ resource "aws_eks_addon" "before_compute" {
service_account_role_arn = each.value.service_account_role_arn
timeouts {
- create = try(coalesce(each.value.timeouts.create, var.addons_timeouts.create), null)
- update = try(coalesce(each.value.timeouts.update, var.addons_timeouts.update), null)
- delete = try(coalesce(each.value.timeouts.delete, var.addons_timeouts.delete), null)
+ create = each.value.timeouts.create != null ? each.value.timeouts.create : var.addons_timeouts.create
+ update = each.value.timeouts.update != null ? each.value.timeouts.update : var.addons_timeouts.update
+ delete = each.value.timeouts.delete != null ? each.value.timeouts.delete : var.addons_timeouts.delete
}
tags = merge(
diff --git a/variables.tf b/variables.tf
index a9d2b43..9647017 100644
--- a/variables.tf
+++ b/variables.tf
@@ -635,7 +635,7 @@ variable "addons" {
create = optional(string)
update = optional(string)
delete = optional(string)
- }))
+ }), {})
tags = optional(map(string), {})
}))
default = null
@@ -648,7 +648,7 @@ variable "addons_timeouts" {
update = optional(string)
delete = optional(string)
})
- default = null
+ default = {}
}
################################################################################