Skip to content

Commit f5f6dae

Browse files
authored
fix: Incorporate AWS provider v6.15 corrections for EKS Auto Mode to support enabling/disabling EKS Auto Mode without affecting non-Auto Mode users (#3526)
* fix: Raise min supported version of AWS provider for EKS Auto Mode corrections * docs: Add note on encryption config settings * fix: Revert forcing a value for all EKS Auto Mode fields now that provider handles this
1 parent bf8c86f commit f5f6dae

File tree

33 files changed

+66
-49
lines changed

33 files changed

+66
-49
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.100.0
3+
rev: v1.101.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ Please note that we strive to provide a comprehensive suite of documentation for
2828

2929
### EKS Auto Mode
3030

31+
> [!CAUTION]
32+
> Due to the current EKS Auto Mode API, to disable EKS Auto Mode you will have to explicity set:
33+
>
34+
>```hcl
35+
>compute_config = {
36+
> enabled = false
37+
> }
38+
>```
39+
>
40+
> If you try to disable by simply removing the `compute_config` block, this will fail to disble EKS Auto Mode. Only after applying with `enabled = false` can you then remove the `compute_config` block from your configurations.
41+
3142
```hcl
3243
module "eks" {
3344
source = "terraform-aws-modules/eks/aws"
@@ -75,6 +86,9 @@ module "eks" {
7586
7687
# Create just the IAM resources for EKS Auto Mode for use with custom node pools
7788
create_auto_mode_iam_resources = true
89+
compute_config = {
90+
enabled = true
91+
}
7892
7993
vpc_id = "vpc-1234556abcdef"
8094
subnet_ids = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"]
@@ -347,15 +361,15 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
347361
| Name | Version |
348362
|------|---------|
349363
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
350-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
364+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
351365
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9 |
352366
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 4.0 |
353367

354368
## Providers
355369

356370
| Name | Version |
357371
|------|---------|
358-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
372+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
359373
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.9 |
360374
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 4.0 |
361375

@@ -422,7 +436,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
422436
| <a name="input_cloudwatch_log_group_retention_in_days"></a> [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | Number of days to retain log events. Default retention - 90 days | `number` | `90` | no |
423437
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | A map of additional tags to add to the cloudwatch log group created | `map(string)` | `{}` | no |
424438
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | A map of additional tags to add to the cluster | `map(string)` | `{}` | no |
425-
| <a name="input_compute_config"></a> [compute\_config](#input\_compute\_config) | Configuration block for the cluster compute configuration | <pre>object({<br/> enabled = optional(bool, false)<br/> node_pools = optional(list(string))<br/> node_role_arn = optional(string)<br/> })</pre> | `{}` | no |
439+
| <a name="input_compute_config"></a> [compute\_config](#input\_compute\_config) | Configuration block for the cluster compute configuration | <pre>object({<br/> enabled = optional(bool, false)<br/> node_pools = optional(list(string))<br/> node_role_arn = optional(string)<br/> })</pre> | `null` | no |
426440
| <a name="input_control_plane_subnet_ids"></a> [control\_plane\_subnet\_ids](#input\_control\_plane\_subnet\_ids) | A list of subnet IDs where the EKS cluster control plane (ENIs) will be provisioned. Used for expanding the pool of subnets used by nodes/node groups without replacing the EKS control plane | `list(string)` | `[]` | no |
427441
| <a name="input_create"></a> [create](#input\_create) | Controls if resources should be created (affects nearly all resources) | `bool` | `true` | no |
428442
| <a name="input_create_auto_mode_iam_resources"></a> [create\_auto\_mode\_iam\_resources](#input\_create\_auto\_mode\_iam\_resources) | Determines whether to create/attach IAM resources for EKS Auto Mode. Useful for when using only custom node pools and not built-in EKS Auto Mode node pools | `bool` | `false` | no |

docs/UPGRADE-21.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
3232
- `addons.most_recent` is now set to `true` by default (was `false`).
3333
- `cluster_identity_providers.issuer_url` is now required to be set by users; the prior incorrect default has been removed. See https://github.com/terraform-aws-modules/terraform-aws-eks/pull/3055 and https://github.com/kubernetes/kubernetes/pull/123561 for more details.
3434
- The OIDC issuer URL for IAM roles for service accounts (IRSA) has been changed to use the new dual stack`oidc-eks` endpoint instead of `oidc.eks`. This is to align with https://github.com/aws/containers-roadmap/issues/2038#issuecomment-2278450601
35+
- With the changes to the variable type definition for `encryption_config` (formerly `cluster_encryption_config`), if you wish to disable secret encryption with a custom KMS key you should set `encryption_config = null` (In `v20.x`, you would previously have set `encryption_config = {}` to achieve the same outcome). Secret encryption can no longer be disabled - it is either enabled by default with the AWS managed key (`encryption_config = null`), or with a custom KMS key ( either leaving as is by not specifying or passing your own custom key ARN). EKS now encrypts secrets at rest by default docs.aws.amazon.com/eks/latest/userguide/envelope-encryption.html and the default secret encryption w/ custom KMS key creation/usage by default was made years prior starting in version `v19.0` of this module. Removing this default behavior will be evaluated at the next breaking change given that secrets are now automatically encrypted at rest by AWS.
3536

3637
## Additional changes
3738

examples/eks-auto-mode/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Note that this example may create resources which cost money. Run `terraform des
2525
| Name | Version |
2626
|------|---------|
2727
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
28-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
28+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
2929

3030
## Providers
3131

3232
| Name | Version |
3333
|------|---------|
34-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
34+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
3535

3636
## Modules
3737

examples/eks-auto-mode/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ module "eks_auto_custom_node_pools" {
6060

6161
# Create just the IAM resources for EKS Auto Mode for use with custom node pools
6262
create_auto_mode_iam_resources = true
63+
compute_config = {
64+
enabled = true
65+
}
6366

6467
vpc_id = module.vpc.vpc_id
6568
subnet_ids = module.vpc.private_subnets

examples/eks-auto-mode/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.15"
88
}
99
}
1010
}

examples/eks-hybrid-nodes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Note that this example may create resources which cost money. Run `terraform des
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
3030
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 3.0 |
3131
| <a name="requirement_http"></a> [http](#requirement\_http) | >= 3.4 |
3232
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 2.5 |
@@ -36,8 +36,8 @@ Note that this example may create resources which cost money. Run `terraform des
3636

3737
| Name | Version |
3838
|------|---------|
39-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
40-
| <a name="provider_aws.remote"></a> [aws.remote](#provider\_aws.remote) | >= 6.13 |
39+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
40+
| <a name="provider_aws.remote"></a> [aws.remote](#provider\_aws.remote) | >= 6.15 |
4141
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 3.0 |
4242
| <a name="provider_http"></a> [http](#provider\_http) | >= 3.4 |
4343
| <a name="provider_local"></a> [local](#provider\_local) | >= 2.5 |

examples/eks-hybrid-nodes/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.15"
88
}
99
helm = {
1010
source = "hashicorp/helm"

examples/eks-managed-node-group/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.13"
7+
version = ">= 6.15"
88
}
99
}
1010
}

examples/karpenter/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ Note that this example may create resources which cost money. Run `terraform des
9494
| Name | Version |
9595
|------|---------|
9696
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
97-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.13 |
97+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
9898
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 3.0 |
9999

100100
## Providers
101101

102102
| Name | Version |
103103
|------|---------|
104-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.13 |
104+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
105105
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 3.0 |
106106

107107
## Modules

0 commit comments

Comments
 (0)