diff --git a/README.md b/README.md index 901dff3675..fa9bcd382d 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | | [time](#requirement\_time) | >= 0.9 | | [tls](#requirement\_tls) | >= 3.0 | @@ -184,7 +184,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | | [time](#provider\_time) | >= 0.9 | | [tls](#provider\_tls) | >= 3.0 | diff --git a/examples/eks-managed-node-group/versions.tf b/examples/eks-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/examples/eks-managed-node-group/versions.tf +++ b/examples/eks-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/examples/karpenter/README.md b/examples/karpenter/README.md index bc09df1fa5..4f94a5b44f 100644 --- a/examples/karpenter/README.md +++ b/examples/karpenter/README.md @@ -89,7 +89,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | | [helm](#requirement\_helm) | >= 2.7 | | [kubectl](#requirement\_kubectl) | >= 2.0 | @@ -97,8 +97,8 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | -| [aws.virginia](#provider\_aws.virginia) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | +| [aws.virginia](#provider\_aws.virginia) | >= 5.57 | | [helm](#provider\_helm) | >= 2.7 | | [kubectl](#provider\_kubectl) | >= 2.0 | diff --git a/examples/karpenter/versions.tf b/examples/karpenter/versions.tf index a43b64f4c4..5cd234e754 100644 --- a/examples/karpenter/versions.tf +++ b/examples/karpenter/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } helm = { source = "hashicorp/helm" diff --git a/examples/outposts/README.md b/examples/outposts/README.md index 3779487fde..b2769e0839 100644 --- a/examples/outposts/README.md +++ b/examples/outposts/README.md @@ -46,14 +46,14 @@ terraform destroy --auto-approve | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | | [kubernetes](#requirement\_kubernetes) | >= 2.20 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | | [kubernetes](#provider\_kubernetes) | >= 2.20 | ## Modules diff --git a/examples/outposts/prerequisites/versions.tf b/examples/outposts/prerequisites/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/examples/outposts/prerequisites/versions.tf +++ b/examples/outposts/prerequisites/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/examples/outposts/versions.tf b/examples/outposts/versions.tf index 2ac7910678..3d08b99032 100644 --- a/examples/outposts/versions.tf +++ b/examples/outposts/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/examples/self-managed-node-group/versions.tf b/examples/self-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/examples/self-managed-node-group/versions.tf +++ b/examples/self-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/modules/eks-managed-node-group/README.md b/modules/eks-managed-node-group/README.md index 05f1a0bea2..7109d6f23e 100644 --- a/modules/eks-managed-node-group/README.md +++ b/modules/eks-managed-node-group/README.md @@ -64,13 +64,13 @@ module "eks_managed_node_group" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/modules/eks-managed-node-group/main.tf b/modules/eks-managed-node-group/main.tf index facd05a810..50554ae98b 100644 --- a/modules/eks-managed-node-group/main.tf +++ b/modules/eks-managed-node-group/main.tf @@ -203,10 +203,11 @@ resource "aws_launch_template" "this" { } } - # # Set on node group instead - # instance_type = var.launch_template_instance_type - kernel_id = var.kernel_id - key_name = var.key_name + # Instance type(s) are generally set on the node group, + # except when a ML capacity block reseravtion is used + instance_type = var.capacity_type == "CAPACITY_BLOCK" ? element(var.instance_types, 0) : null + kernel_id = var.kernel_id + key_name = var.key_name dynamic "license_specification" { for_each = length(var.license_specifications) > 0 ? var.license_specifications : {} @@ -408,8 +409,9 @@ resource "aws_eks_node_group" "this" { capacity_type = var.capacity_type disk_size = var.use_custom_launch_template ? null : var.disk_size # if using a custom LT, set disk size on custom LT or else it will error here force_update_version = var.force_update_version - instance_types = var.instance_types - labels = var.labels + # ML capacity block reservation requires instance type to be set on the launch template + instance_types = var.capacity_type == "CAPACITY_BLOCK" ? null : var.instance_types + labels = var.labels dynamic "launch_template" { for_each = var.use_custom_launch_template ? [1] : [] diff --git a/modules/eks-managed-node-group/versions.tf b/modules/eks-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/modules/eks-managed-node-group/versions.tf +++ b/modules/eks-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/modules/fargate-profile/README.md b/modules/fargate-profile/README.md index 2396f353ab..609614b9a1 100644 --- a/modules/fargate-profile/README.md +++ b/modules/fargate-profile/README.md @@ -29,13 +29,13 @@ module "fargate_profile" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/modules/fargate-profile/versions.tf b/modules/fargate-profile/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/modules/fargate-profile/versions.tf +++ b/modules/fargate-profile/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/modules/karpenter/README.md b/modules/karpenter/README.md index ca1e7bdc0f..eeecd7ba26 100644 --- a/modules/karpenter/README.md +++ b/modules/karpenter/README.md @@ -86,13 +86,13 @@ module "karpenter" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/modules/karpenter/versions.tf b/modules/karpenter/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/modules/karpenter/versions.tf +++ b/modules/karpenter/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/modules/self-managed-node-group/README.md b/modules/self-managed-node-group/README.md index 05834cc935..ffa6d24837 100644 --- a/modules/self-managed-node-group/README.md +++ b/modules/self-managed-node-group/README.md @@ -43,13 +43,13 @@ module "self_managed_node_group" { | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/modules/self-managed-node-group/versions.tf b/modules/self-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/modules/self-managed-node-group/versions.tf +++ b/modules/self-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/tests/eks-managed-node-group/README.md b/tests/eks-managed-node-group/README.md index 169b4c4f18..9c736bc39b 100644 --- a/tests/eks-managed-node-group/README.md +++ b/tests/eks-managed-node-group/README.md @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/tests/eks-managed-node-group/versions.tf b/tests/eks-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/tests/eks-managed-node-group/versions.tf +++ b/tests/eks-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/tests/fargate-profile/README.md b/tests/fargate-profile/README.md index bdb1a909a5..a6980a2c3b 100644 --- a/tests/fargate-profile/README.md +++ b/tests/fargate-profile/README.md @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/tests/fargate-profile/versions.tf b/tests/fargate-profile/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/tests/fargate-profile/versions.tf +++ b/tests/fargate-profile/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/tests/self-managed-node-group/README.md b/tests/self-managed-node-group/README.md index feebef9c92..0a1f76c2e6 100644 --- a/tests/self-managed-node-group/README.md +++ b/tests/self-managed-node-group/README.md @@ -18,13 +18,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.2 | -| [aws](#requirement\_aws) | >= 5.40 | +| [aws](#requirement\_aws) | >= 5.57 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.40 | +| [aws](#provider\_aws) | >= 5.57 | ## Modules diff --git a/tests/self-managed-node-group/versions.tf b/tests/self-managed-node-group/versions.tf index 6f83215f50..1ad4db0909 100644 --- a/tests/self-managed-node-group/versions.tf +++ b/tests/self-managed-node-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } } } diff --git a/versions.tf b/versions.tf index d0f347a88a..6243ed0255 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.40" + version = ">= 5.57" } tls = { source = "hashicorp/tls"