feat: Add node repair config to managed node group (#3271)

* feat: add var.node_repair_config to eks-managed-node-group

Fixes terraform-aws-modules/terraform-aws-eks#3249

* chore: run terraform-docs

* chore: update examples/eks-managed-node-group

* fix: Correct implementation

---------

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
This commit is contained in:
Kasper Jacobsen
2025-01-17 18:35:47 +01:00
committed by GitHub
parent 4fe03aed68
commit edd7ef36dd
34 changed files with 74 additions and 50 deletions

View File

@@ -64,13 +64,13 @@ module "eks_managed_node_group" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.83 |
## Modules
@@ -170,6 +170,7 @@ module "eks_managed_node_group" {
| <a name="input_min_size"></a> [min\_size](#input\_min\_size) | Minimum number of instances/nodes | `number` | `0` | 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 | `list(any)` | `[]` | 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_placement"></a> [placement](#input\_placement) | The placement of the instance | `map(string)` | `{}` | no |
| <a name="input_placement_group_az"></a> [placement\_group\_az](#input\_placement\_group\_az) | Availability zone where placement group is created (ex. `eu-west-1c`) | `string` | `null` | no |
| <a name="input_placement_group_strategy"></a> [placement\_group\_strategy](#input\_placement\_group\_strategy) | The placement group strategy | `string` | `"cluster"` | no |

View File

@@ -458,6 +458,14 @@ resource "aws_eks_node_group" "this" {
}
}
dynamic "node_repair_config" {
for_each = var.node_repair_config != null ? [var.node_repair_config] : []
content {
enabled = node_repair_config.value.enabled
}
}
timeouts {
create = lookup(var.timeouts, "create", null)
update = lookup(var.timeouts, "update", null)

View File

@@ -468,6 +468,14 @@ variable "update_config" {
}
}
variable "node_repair_config" {
description = "The node auto repair configuration for the node group"
type = object({
enabled = optional(bool, true)
})
default = null
}
variable "timeouts" {
description = "Create, update, and delete timeout configurations for the node group"
type = map(string)

View File

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.81"
version = ">= 5.83"
}
}
}

View File

@@ -29,13 +29,13 @@ module "fargate_profile" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.83 |
## Modules

View File

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.81"
version = ">= 5.83"
}
}
}

View File

@@ -75,13 +75,13 @@ module "eks_hybrid_node_role" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.83 |
## Modules

View File

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.81"
version = ">= 5.83"
}
}
}

View File

@@ -86,13 +86,13 @@ module "karpenter" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.83 |
## Modules

View File

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.81"
version = ">= 5.83"
}
}
}

View File

@@ -43,13 +43,13 @@ module "self_managed_node_group" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.81 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.83 |
## Modules

View File

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.81"
version = ">= 5.83"
}
}
}