Skip to content

Commit

Permalink
fix: Move encryption_config default for resources out of type def…
Browse files Browse the repository at this point in the history
…inition and to default variable value to allow disabling encryption (#3436)

* Update variables.tf

Fixes inability to provide default {} encryption_config

* Readme update

* fix syntax

* syntax

* fix: Run pre-commit

---------

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
  • Loading branch information
2 people authored and GitHub committed Jul 24, 2025
1 parent 0049a9b commit b37368f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
| <a name="input_enable_irsa"></a> [enable\_irsa](#input\_enable\_irsa) | Determines whether to create an OpenID Connect Provider for EKS to enable IRSA | `bool` | `true` | no |
| <a name="input_enable_kms_key_rotation"></a> [enable\_kms\_key\_rotation](#input\_enable\_kms\_key\_rotation) | Specifies whether key rotation is enabled | `bool` | `true` | no |
| <a name="input_enabled_log_types"></a> [enabled\_log\_types](#input\_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)` | <pre>[<br/> "audit",<br/> "api",<br/> "authenticator"<br/>]</pre> | no |
| <a name="input_encryption_config"></a> [encryption\_config](#input\_encryption\_config) | Configuration block with encryption configuration for the cluster | <pre>object({<br/> provider_key_arn = optional(string)<br/> resources = optional(list(string), ["secrets"])<br/> })</pre> | `{}` | no |
| <a name="input_encryption_config"></a> [encryption\_config](#input\_encryption\_config) | Configuration block with encryption configuration for the cluster | <pre>object({<br/> provider_key_arn = optional(string)<br/> resources = optional(list(string))<br/> })</pre> | <pre>{<br/> "resources": [<br/> "secrets"<br/> ]<br/>}</pre> | no |
| <a name="input_encryption_policy_description"></a> [encryption\_policy\_description](#input\_encryption\_policy\_description) | Description of the cluster encryption policy created | `string` | `"Cluster encryption policy to allow cluster role to utilize CMK provided"` | no |
| <a name="input_encryption_policy_name"></a> [encryption\_policy\_name](#input\_encryption\_policy\_name) | Name to use on cluster encryption policy created | `string` | `null` | no |
| <a name="input_encryption_policy_path"></a> [encryption\_policy\_path](#input\_encryption\_policy\_path) | Cluster encryption policy path | `string` | `null` | no |
Expand Down
6 changes: 4 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ variable "encryption_config" {
description = "Configuration block with encryption configuration for the cluster"
type = object({
provider_key_arn = optional(string)
resources = optional(list(string), ["secrets"])
resources = optional(list(string))
})
default = {}
default = {
resources = ["secrets"]
}
}

variable "attach_encryption_policy" {
Expand Down

0 comments on commit b37368f

Please sign in to comment.