Skip to content

Commit b8553fd

Browse files
authored
Merge branch 'master' into master
2 parents 02a3207 + 97a08c8 commit b8553fd

File tree

32 files changed

+342
-120
lines changed

32 files changed

+342
-120
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.96.1
3+
rev: v1.96.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [20.29.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v20.28.0...v20.29.0) (2024-11-08)
6+
7+
8+
### Features
9+
10+
* Add support for pod identity association on EKS addons ([#3203](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/3203)) ([a224334](https://github.com/terraform-aws-modules/terraform-aws-eks/commit/a224334fc8000dc8728971dff8adad46ceb7a8a1))
11+
12+
## [20.28.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v20.27.0...v20.28.0) (2024-11-02)
13+
14+
15+
### Features
16+
17+
* Add support for creating `efa-only` network interfaces ([#3196](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/3196)) ([c6da22c](https://github.com/terraform-aws-modules/terraform-aws-eks/commit/c6da22c78f60a8643a6c76f97c93724f4e1f4e5a))
18+
19+
## [20.27.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v20.26.1...v20.27.0) (2024-11-01)
20+
21+
22+
### Features
23+
24+
* Add support for zonal shift ([#3195](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/3195)) ([1b0ac83](https://github.com/terraform-aws-modules/terraform-aws-eks/commit/1b0ac832647dcf0425aedba119fa8276008cbe28))
25+
26+
## [20.26.1](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v20.26.0...v20.26.1) (2024-10-27)
27+
28+
29+
### Bug Fixes
30+
31+
* Use dynamic partition data source to determine DNS suffix for Karpenter EC2 pass role permission ([#3193](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/3193)) ([dea6c44](https://github.com/terraform-aws-modules/terraform-aws-eks/commit/dea6c44b459a546b1386563dfd497bc9d766bfe1))
32+
533
## [20.26.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v20.25.0...v20.26.0) (2024-10-12)
634

735

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ module "eks" {
7070
access_entries = {
7171
# One access entry with a policy associated
7272
example = {
73-
kubernetes_groups = []
7473
principal_arn = "arn:aws:iam::123456789012:role/something"
7574
7675
policy_associations = {
@@ -175,15 +174,15 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
175174
| Name | Version |
176175
|------|---------|
177176
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
178-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |
177+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.75 |
179178
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9 |
180179
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.0 |
181180

182181
## Providers
183182

184183
| Name | Version |
185184
|------|---------|
186-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.70 |
185+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.75 |
187186
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.9 |
188187
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 3.0 |
189188

@@ -268,6 +267,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
268267
| <a name="input_cluster_timeouts"></a> [cluster\_timeouts](#input\_cluster\_timeouts) | Create, update, and delete timeout configurations for the cluster | `map(string)` | `{}` | no |
269268
| <a name="input_cluster_upgrade_policy"></a> [cluster\_upgrade\_policy](#input\_cluster\_upgrade\_policy) | Configuration block for the cluster upgrade policy | `any` | `{}` | no |
270269
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes `<major>.<minor>` version to use for the EKS cluster (i.e.: `1.27`) | `string` | `null` | no |
270+
| <a name="input_cluster_zonal_shift_config"></a> [cluster\_zonal\_shift\_config](#input\_cluster\_zonal\_shift\_config) | Configuration block for the cluster zonal shift | `any` | `{}` | no |
271271
| <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 |
272272
| <a name="input_create"></a> [create](#input\_create) | Controls if resources should be created (affects nearly all resources) | `bool` | `true` | no |
273273
| <a name="input_create_cloudwatch_log_group"></a> [create\_cloudwatch\_log\_group](#input\_create\_cloudwatch\_log\_group) | Determines whether a log group is created by this module for the cluster logs. If not, AWS will automatically create one if logging is enabled | `bool` | `true` | no |

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 = ">= 5.70"
7+
version = ">= 5.75"
88
}
99
}
1010
}

examples/karpenter/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ Note that this example may create resources which cost money. Run `terraform des
8989
| Name | Version |
9090
|------|---------|
9191
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
92-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |
92+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.75 |
9393
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.7 |
9494
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 2.0 |
9595

9696
## Providers
9797

9898
| Name | Version |
9999
|------|---------|
100-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.70 |
101-
| <a name="provider_aws.virginia"></a> [aws.virginia](#provider\_aws.virginia) | >= 5.70 |
100+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.75 |
101+
| <a name="provider_aws.virginia"></a> [aws.virginia](#provider\_aws.virginia) | >= 5.75 |
102102
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.7 |
103103
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | >= 2.0 |
104104

examples/karpenter/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 = ">= 5.70"
7+
version = ">= 5.75"
88
}
99
helm = {
1010
source = "hashicorp/helm"

examples/self-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 = ">= 5.70"
7+
version = ">= 5.75"
88
}
99
}
1010
}

main.tf

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ resource "aws_eks_cluster" "this" {
9292
}
9393
}
9494

95+
dynamic "zonal_shift_config" {
96+
for_each = length(var.cluster_zonal_shift_config) > 0 ? [var.cluster_zonal_shift_config] : []
97+
98+
content {
99+
enabled = try(zonal_shift_config.value.enabled, null)
100+
}
101+
}
102+
95103
tags = merge(
96104
{ terraform-aws-modules = "eks" },
97105
var.tags,
@@ -497,8 +505,18 @@ resource "aws_eks_addon" "this" {
497505
cluster_name = aws_eks_cluster.this[0].name
498506
addon_name = try(each.value.name, each.key)
499507

500-
addon_version = coalesce(try(each.value.addon_version, null), data.aws_eks_addon_version.this[each.key].version)
501-
configuration_values = try(each.value.configuration_values, null)
508+
addon_version = coalesce(try(each.value.addon_version, null), data.aws_eks_addon_version.this[each.key].version)
509+
configuration_values = try(each.value.configuration_values, null)
510+
511+
dynamic "pod_identity_association" {
512+
for_each = try(each.value.pod_identity_association, [])
513+
514+
content {
515+
role_arn = pod_identity_association.value.role_arn
516+
service_account = pod_identity_association.value.service_account
517+
}
518+
}
519+
502520
preserve = try(each.value.preserve, true)
503521
resolve_conflicts_on_create = try(each.value.resolve_conflicts_on_create, "OVERWRITE")
504522
resolve_conflicts_on_update = try(each.value.resolve_conflicts_on_update, "OVERWRITE")
@@ -526,8 +544,18 @@ resource "aws_eks_addon" "before_compute" {
526544
cluster_name = aws_eks_cluster.this[0].name
527545
addon_name = try(each.value.name, each.key)
528546

529-
addon_version = coalesce(try(each.value.addon_version, null), data.aws_eks_addon_version.this[each.key].version)
530-
configuration_values = try(each.value.configuration_values, null)
547+
addon_version = coalesce(try(each.value.addon_version, null), data.aws_eks_addon_version.this[each.key].version)
548+
configuration_values = try(each.value.configuration_values, null)
549+
550+
dynamic "pod_identity_association" {
551+
for_each = try(each.value.pod_identity_association, [])
552+
553+
content {
554+
role_arn = pod_identity_association.value.role_arn
555+
service_account = pod_identity_association.value.service_account
556+
}
557+
}
558+
531559
preserve = try(each.value.preserve, true)
532560
resolve_conflicts_on_create = try(each.value.resolve_conflicts_on_create, "OVERWRITE")
533561
resolve_conflicts_on_update = try(each.value.resolve_conflicts_on_update, "OVERWRITE")

modules/eks-managed-node-group/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ module "eks_managed_node_group" {
6464
| Name | Version |
6565
|------|---------|
6666
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
67-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |
67+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.75 |
6868

6969
## Providers
7070

7171
| Name | Version |
7272
|------|---------|
73-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.70 |
73+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.75 |
7474

7575
## Modules
7676

@@ -132,9 +132,11 @@ module "eks_managed_node_group" {
132132
| <a name="input_disable_api_termination"></a> [disable\_api\_termination](#input\_disable\_api\_termination) | If true, enables EC2 instance termination protection | `bool` | `null` | no |
133133
| <a name="input_disk_size"></a> [disk\_size](#input\_disk\_size) | Disk size in GiB for nodes. Defaults to `20`. Only valid when `use_custom_launch_template` = `false` | `number` | `null` | no |
134134
| <a name="input_ebs_optimized"></a> [ebs\_optimized](#input\_ebs\_optimized) | If true, the launched EC2 instance(s) will be EBS-optimized | `bool` | `null` | no |
135+
| <a name="input_efa_indices"></a> [efa\_indices](#input\_efa\_indices) | The indices of the network interfaces that should be EFA-enabled. Only valid when `enable_efa_support` = `true` | `list(number)` | <pre>[<br/> 0<br/>]</pre> | no |
135136
| <a name="input_elastic_gpu_specifications"></a> [elastic\_gpu\_specifications](#input\_elastic\_gpu\_specifications) | The elastic GPU to attach to the instance | `any` | `{}` | no |
136137
| <a name="input_elastic_inference_accelerator"></a> [elastic\_inference\_accelerator](#input\_elastic\_inference\_accelerator) | Configuration block containing an Elastic Inference Accelerator to attach to the instance | `map(string)` | `{}` | no |
137138
| <a name="input_enable_bootstrap_user_data"></a> [enable\_bootstrap\_user\_data](#input\_enable\_bootstrap\_user\_data) | Determines whether the bootstrap configurations are populated within the user data template. Only valid when using a custom AMI via `ami_id` | `bool` | `false` | no |
139+
| <a name="input_enable_efa_only"></a> [enable\_efa\_only](#input\_enable\_efa\_only) | Determines whether to enable EFA (`false`, default) or EFA and EFA-only (`true`) network interfaces. Note: requires vpc-cni version `v1.18.4` or later | `bool` | `false` | no |
138140
| <a name="input_enable_efa_support"></a> [enable\_efa\_support](#input\_enable\_efa\_support) | Determines whether to enable Elastic Fabric Adapter (EFA) support | `bool` | `false` | no |
139141
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Enables/disables detailed monitoring | `bool` | `true` | no |
140142
| <a name="input_enclave_options"></a> [enclave\_options](#input\_enclave\_options) | Enable Nitro Enclaves on launched instances | `map(string)` | `{}` | no |

modules/eks-managed-node-group/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ locals {
4444
efa_instance_type = try(element(var.instance_types, 0), "")
4545
num_network_cards = try(data.aws_ec2_instance_type.this[0].maximum_network_cards, 0)
4646

47+
# Primary network interface must be EFA, remaining can be EFA or EFA-only
4748
efa_network_interfaces = [
4849
for i in range(local.num_network_cards) : {
4950
associate_public_ip_address = false
5051
delete_on_termination = true
5152
device_index = i == 0 ? 0 : 1
5253
network_card_index = i
53-
interface_type = "efa"
54+
interface_type = var.enable_efa_only ? contains(concat([0], var.efa_indices), i) ? "efa" : "efa-only" : "efa"
5455
}
5556
]
5657

0 commit comments

Comments
 (0)