diff --git a/README.md b/README.md index 1d5b5c07be..3065898d86 100644 --- a/README.md +++ b/README.md @@ -395,7 +395,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple | [cluster\_addons\_timeouts](#input\_cluster\_addons\_timeouts) | Create, update, and delete timeout configurations for the cluster addons | `map(string)` | `{}` | no | | [cluster\_compute\_config](#input\_cluster\_compute\_config) | Configuration block for the cluster compute configuration | `any` | `{}` | no | | [cluster\_enabled\_log\_types](#input\_cluster\_enabled\_log\_types) | A list of the desired control plane logs to enable. For more information, see Amazon EKS Control Plane Logging documentation (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) | `list(string)` |
[| no | -| [cluster\_encryption\_config](#input\_cluster\_encryption\_config) | Configuration block with encryption configuration for the cluster. To disable secret encryption, set this value to `{}` | `any` |
"audit",
"api",
"authenticator"
]
{
"resources": [
"secrets"
]
} | no |
+| [cluster\_encryption\_config](#input\_cluster\_encryption\_config) | Configuration block with encryption configuration for the cluster. To disable secret encryption, set this value to `{}` or `null` | `any` | {
"resources": [
"secrets"
]
} | no |
| [cluster\_encryption\_policy\_description](#input\_cluster\_encryption\_policy\_description) | Description of the cluster encryption policy created | `string` | `"Cluster encryption policy to allow cluster role to utilize CMK provided"` | no |
| [cluster\_encryption\_policy\_name](#input\_cluster\_encryption\_policy\_name) | Name to use on cluster encryption policy created | `string` | `null` | no |
| [cluster\_encryption\_policy\_path](#input\_cluster\_encryption\_policy\_path) | Cluster encryption policy path | `string` | `null` | no |
diff --git a/main.tf b/main.tf
index 18933422f5..91d074ec31 100644
--- a/main.tf
+++ b/main.tf
@@ -23,7 +23,7 @@ locals {
cluster_role = try(aws_iam_role.this[0].arn, var.iam_role_arn)
create_outposts_local_cluster = length(var.outpost_config) > 0
- enable_cluster_encryption_config = length(var.cluster_encryption_config) > 0 && !local.create_outposts_local_cluster
+ enable_cluster_encryption_config = try(length(var.cluster_encryption_config), 0) > 0 && !local.create_outposts_local_cluster
auto_mode_enabled = try(var.cluster_compute_config.enabled, false)
}
diff --git a/variables.tf b/variables.tf
index 855c2133ec..b4a3cbb89a 100644
--- a/variables.tf
+++ b/variables.tf
@@ -129,7 +129,7 @@ variable "outpost_config" {
}
variable "cluster_encryption_config" {
- description = "Configuration block with encryption configuration for the cluster. To disable secret encryption, set this value to `{}`"
+ description = "Configuration block with encryption configuration for the cluster. To disable secret encryption, set this value to `{}` or `null`"
type = any
default = {
resources = ["secrets"]