Skip to content

Commit

Permalink
feat: Add support for node repair configuration arguments (#3585)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryant Biggs authored and GitHub committed Nov 16, 2025
1 parent 2f14548 commit c0ed29b
Show file tree
Hide file tree
Showing 31 changed files with 81 additions and 46 deletions.
6 changes: 3 additions & 3 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/eks-auto-mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/eks-auto-mode/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
6 changes: 3 additions & 3 deletions examples/eks-hybrid-nodes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 3.0 |
| <a name="requirement_http"></a> [http](#requirement\_http) | >= 3.4 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 2.5 |
Expand All @@ -36,8 +36,8 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws.remote"></a> [aws.remote](#provider\_aws.remote) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |
| <a name="provider_aws.remote"></a> [aws.remote](#provider\_aws.remote) | >= 6.20 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 3.0 |
| <a name="provider_http"></a> [http](#provider\_http) | >= 3.4 |
| <a name="provider_local"></a> [local](#provider\_local) | >= 2.5 |
Expand Down
2 changes: 1 addition & 1 deletion examples/eks-hybrid-nodes/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
helm = {
source = "hashicorp/helm"
Expand Down
2 changes: 1 addition & 1 deletion examples/eks-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions examples/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/karpenter/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
helm = {
source = "hashicorp/helm"
Expand Down
2 changes: 1 addition & 1 deletion examples/self-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
6 changes: 3 additions & 3 deletions modules/eks-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ module "eks_managed_node_group" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down Expand Up @@ -170,7 +170,7 @@ module "eks_managed_node_group" {
| <a name="input_min_size"></a> [min\_size](#input\_min\_size) | Minimum number of instances/nodes | `number` | `1` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the EKS managed node group | `string` | `""` | no |
| <a name="input_network_interfaces"></a> [network\_interfaces](#input\_network\_interfaces) | Customize network interfaces to be attached at instance boot time | <pre>list(object({<br/> associate_carrier_ip_address = optional(bool)<br/> associate_public_ip_address = optional(bool)<br/> connection_tracking_specification = optional(object({<br/> tcp_established_timeout = optional(number)<br/> udp_stream_timeout = optional(number)<br/> udp_timeout = optional(number)<br/> }))<br/> delete_on_termination = optional(bool)<br/> description = optional(string)<br/> device_index = optional(number)<br/> ena_srd_specification = optional(object({<br/> ena_srd_enabled = optional(bool)<br/> ena_srd_udp_specification = optional(object({<br/> ena_srd_udp_enabled = optional(bool)<br/> }))<br/> }))<br/> interface_type = optional(string)<br/> ipv4_address_count = optional(number)<br/> ipv4_addresses = optional(list(string))<br/> ipv4_prefix_count = optional(number)<br/> ipv4_prefixes = optional(list(string))<br/> ipv6_address_count = optional(number)<br/> ipv6_addresses = optional(list(string))<br/> ipv6_prefix_count = optional(number)<br/> ipv6_prefixes = optional(list(string))<br/> network_card_index = optional(number)<br/> network_interface_id = optional(string)<br/> primary_ipv6 = optional(bool)<br/> private_ip_address = optional(string)<br/> security_groups = optional(list(string), [])<br/> }))</pre> | `[]` | no |
| <a name="input_node_repair_config"></a> [node\_repair\_config](#input\_node\_repair\_config) | The node auto repair configuration for the node group | <pre>object({<br/> enabled = optional(bool, true)<br/> })</pre> | `null` | no |
| <a name="input_node_repair_config"></a> [node\_repair\_config](#input\_node\_repair\_config) | The node auto repair configuration for the node group | <pre>object({<br/> enabled = optional(bool, true)<br/> max_parallel_nodes_repaired_count = optional(number)<br/> max_parallel_nodes_repaired_percentage = optional(number)<br/> max_unhealthy_node_threshold_count = optional(number)<br/> max_unhealthy_node_threshold_percentage = optional(number)<br/> node_repair_config_overrides = optional(list(object({<br/> min_repair_wait_time_mins = number<br/> node_monitoring_condition = string<br/> node_unhealthy_reason = string<br/> repair_action = string<br/> })))<br/> })</pre> | `null` | no |
| <a name="input_partition"></a> [partition](#input\_partition) | The AWS partition - pass through value to reduce number of GET requests from data sources | `string` | `""` | no |
| <a name="input_placement"></a> [placement](#input\_placement) | The placement of the instance | <pre>object({<br/> affinity = optional(string)<br/> availability_zone = optional(string)<br/> group_name = optional(string)<br/> host_id = optional(string)<br/> host_resource_group_arn = optional(string)<br/> partition_number = optional(number)<br/> spread_domain = optional(string)<br/> tenancy = optional(string)<br/> })</pre> | `null` | no |
| <a name="input_post_bootstrap_user_data"></a> [post\_bootstrap\_user\_data](#input\_post\_bootstrap\_user\_data) | User data that is appended to the user data script after of the EKS bootstrap script. Not used when `ami_type` = `BOTTLEROCKET_*` | `string` | `null` | no |
Expand Down
17 changes: 16 additions & 1 deletion modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,22 @@ resource "aws_eks_node_group" "this" {
for_each = var.node_repair_config != null ? [var.node_repair_config] : []

content {
enabled = node_repair_config.value.enabled
enabled = node_repair_config.value.enabled
max_parallel_nodes_repaired_count = node_repair_config.value.max_parallel_nodes_repaired_count
max_parallel_nodes_repaired_percentage = node_repair_config.value.max_parallel_nodes_repaired_percentage
max_unhealthy_node_threshold_count = node_repair_config.value.max_unhealthy_node_threshold_count
max_unhealthy_node_threshold_percentage = node_repair_config.value.max_unhealthy_node_threshold_percentage

dynamic "node_repair_config_overrides" {
for_each = node_repair_config.value.node_repair_config_overrides != null ? node_repair_config.value.node_repair_config_overrides : []

content {
min_repair_wait_time_mins = node_repair_config_overrides.value.min_repair_wait_time_mins
node_monitoring_condition = node_repair_config_overrides.value.node_monitoring_condition
node_unhealthy_reason = node_repair_config_overrides.value.node_unhealthy_reason
repair_action = node_repair_config_overrides.value.repair_action
}
}
}
}

Expand Down
12 changes: 11 additions & 1 deletion modules/eks-managed-node-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,17 @@ variable "update_config" {
variable "node_repair_config" {
description = "The node auto repair configuration for the node group"
type = object({
enabled = optional(bool, true)
enabled = optional(bool, true)
max_parallel_nodes_repaired_count = optional(number)
max_parallel_nodes_repaired_percentage = optional(number)
max_unhealthy_node_threshold_count = optional(number)
max_unhealthy_node_threshold_percentage = optional(number)
node_repair_config_overrides = optional(list(object({
min_repair_wait_time_mins = number
node_monitoring_condition = string
node_unhealthy_reason = string
repair_action = string
})))
})
default = null
}
Expand Down
2 changes: 1 addition & 1 deletion modules/eks-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions modules/fargate-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ module "fargate_profile" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/fargate-profile/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions modules/hybrid-node-role/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ module "eks_hybrid_node_role" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/hybrid-node-role/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions modules/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ module "karpenter" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/karpenter/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions modules/self-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ module "self_managed_node_group" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/self-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions tests/eks-fargate-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion tests/eks-fargate-profile/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
2 changes: 1 addition & 1 deletion tests/eks-hybrid-nodes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 4.0 |

## Providers
Expand Down
2 changes: 1 addition & 1 deletion tests/eks-hybrid-nodes/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
tls = {
source = "hashicorp/tls"
Expand Down
4 changes: 2 additions & 2 deletions tests/eks-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion tests/eks-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
4 changes: 2 additions & 2 deletions tests/self-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.20 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion tests/self-managed-node-group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
}
}
12 changes: 11 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,17 @@ variable "eks_managed_node_groups" {
instance_types = optional(list(string))
labels = optional(map(string))
node_repair_config = optional(object({
enabled = optional(bool)
enabled = optional(bool)
max_parallel_nodes_repaired_count = optional(number)
max_parallel_nodes_repaired_percentage = optional(number)
max_unhealthy_node_threshold_count = optional(number)
max_unhealthy_node_threshold_percentage = optional(number)
node_repair_config_overrides = optional(list(object({
min_repair_wait_time_mins = number
node_monitoring_condition = string
node_unhealthy_reason = string
repair_action = string
})))
}))
remote_access = optional(object({
ec2_ssh_key = optional(string)
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.15"
version = ">= 6.20"
}
tls = {
source = "hashicorp/tls"
Expand Down

0 comments on commit c0ed29b

Please sign in to comment.