Skip to content

Commit

Permalink
feat: Add support for newly released AL2023 accelerated AMI types (te…
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs authored Oct 12, 2024
1 parent eb78240 commit b2a8617
Show file tree
Hide file tree
Showing 34 changed files with 58 additions and 47 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module "eks" {
version = "~> 20.0"
cluster_name = "my-cluster"
cluster_version = "1.30"
cluster_version = "1.31"
cluster_endpoint_public_access = true
Expand Down Expand Up @@ -175,15 +175,15 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9 |
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.61 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.70 |
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.9 |
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 3.0 |

Expand Down
4 changes: 2 additions & 2 deletions docs/compute_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Refer to the [Self Managed Node Group documentation](https://docs.aws.amazon.com
1. The `self-managed-node-group` uses the latest AWS EKS Optimized AMI (Linux) for the given Kubernetes version by default:

```hcl
cluster_version = "1.27"
cluster_version = "1.31"
# This self managed node group will use the latest AWS EKS Optimized AMI for Kubernetes 1.27
self_managed_node_groups = {
Expand All @@ -124,7 +124,7 @@ Refer to the [Self Managed Node Group documentation](https://docs.aws.amazon.com
2. To use Bottlerocket, specify the `ami_type` as one of the respective `"BOTTLEROCKET_*" types` and supply a Bottlerocket OS AMI:

```hcl
cluster_version = "1.27"
cluster_version = "1.31"
self_managed_node_groups = {
bottlerocket = {
Expand Down
2 changes: 1 addition & 1 deletion examples/eks-managed-node-group/eks-al2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_al2" {
version = "~> 20.0"

cluster_name = "${local.name}-al2"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
Expand Down
2 changes: 1 addition & 1 deletion examples/eks-managed-node-group/eks-al2023.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_al2023" {
version = "~> 20.0"

cluster_name = "${local.name}-al2023"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
Expand Down
2 changes: 1 addition & 1 deletion examples/eks-managed-node-group/eks-bottlerocket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_bottlerocket" {
version = "~> 20.0"

cluster_name = "${local.name}-bottlerocket"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
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 = ">= 5.61"
version = ">= 5.70"
}
}
}
6 changes: 3 additions & 3 deletions examples/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.7 |
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.61 |
| <a name="provider_aws.virginia"></a> [aws.virginia](#provider\_aws.virginia) | >= 5.61 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.70 |
| <a name="provider_aws.virginia"></a> [aws.virginia](#provider\_aws.virginia) | >= 5.70 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.7 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | >= 2.0 |

Expand Down
4 changes: 2 additions & 2 deletions examples/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module "eks" {
source = "../.."

cluster_name = local.name
cluster_version = "1.30"
cluster_version = "1.31"

# Gives Terraform identity admin access to cluster which will
# allow deploying resources (Karpenter) into the cluster
Expand Down Expand Up @@ -157,7 +157,7 @@ resource "helm_release" "karpenter" {
repository_username = data.aws_ecrpublic_authorization_token.token.user_name
repository_password = data.aws_ecrpublic_authorization_token.token.password
chart = "karpenter"
version = "1.0.0"
version = "1.0.6"
wait = false

values = [
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 = ">= 5.61"
version = ">= 5.70"
}
helm = {
source = "hashicorp/helm"
Expand Down
2 changes: 1 addition & 1 deletion examples/self-managed-node-group/eks-al2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_al2" {
version = "~> 20.0"

cluster_name = "${local.name}-al2"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
Expand Down
2 changes: 1 addition & 1 deletion examples/self-managed-node-group/eks-al2023.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_al2023" {
version = "~> 20.0"

cluster_name = "${local.name}-al2023"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
Expand Down
2 changes: 1 addition & 1 deletion examples/self-managed-node-group/eks-bottlerocket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "eks_bottlerocket" {
version = "~> 20.0"

cluster_name = "${local.name}-bottlerocket"
cluster_version = "1.30"
cluster_version = "1.31"

# EKS Addons
cluster_addons = {
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 = ">= 5.61"
version = ">= 5.70"
}
}
}
2 changes: 2 additions & 0 deletions modules/_user_data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ locals {
WINDOWS_FULL_2022_x86_64 = "windows"
AL2023_x86_64_STANDARD = "al2023"
AL2023_ARM_64_STANDARD = "al2023"
AL2023_x86_64_NEURON = "al2023"
AL2023_x86_64_NVIDIA = "al2023"
}
# Try to use `ami_type` first, but fall back to current, default behavior
# TODO - will be removed in v21.0
Expand Down
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 @@ -10,7 +10,7 @@ module "eks_managed_node_group" {
name = "separate-eks-mng"
cluster_name = "my-cluster"
cluster_version = "1.27"
cluster_version = "1.31"
subnet_ids = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"]
Expand Down Expand Up @@ -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.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## Modules

Expand Down
2 changes: 2 additions & 0 deletions modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ locals {
WINDOWS_FULL_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_cluster_version}"
AL2023_x86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/standard/recommended/release_version"
AL2023_ARM_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/arm64/standard/recommended/release_version"
AL2023_x86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/neuron/recommended/release_version"
AL2023_x86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/nvidia/recommended/release_version"
}

# The Windows SSM params currently do not have a release version, so we have to get the full output JSON blob and parse out the release version
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 = ">= 5.61"
version = ">= 5.70"
}
}
}
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.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## 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 = ">= 5.61"
version = ">= 5.70"
}
}
}
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.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## 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 = ">= 5.61"
version = ">= 5.70"
}
}
}
6 changes: 3 additions & 3 deletions modules/self-managed-node-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "self_managed_node_group" {
name = "separate-self-mng"
cluster_name = "my-cluster"
cluster_version = "1.27"
cluster_version = "1.31"
cluster_endpoint = "https://012345678903AB2BAE5D1E0BFE0E2B50.gr7.us-east-1.eks.amazonaws.com"
cluster_auth_base64 = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKbXFqQ1VqNGdGR2w3ZW5PeWthWnZ2RjROOTVOUEZCM2o0cGhVZUsrWGFtN2ZSQnZya0d6OGxKZmZEZWF2b2plTwpQK2xOZFlqdHZncmxCUEpYdHZIZmFzTzYxVzdIZmdWQ2EvamdRM2w3RmkvL1dpQmxFOG9oWUZkdWpjc0s1SXM2CnNkbk5KTTNYUWN2TysrSitkV09NT2ZlNzlsSWdncmdQLzgvRU9CYkw3eUY1aU1hS3lsb1RHL1V3TlhPUWt3ZUcKblBNcjdiUmdkQ1NCZTlXYXowOGdGRmlxV2FOditsTDhsODBTdFZLcWVNVlUxbjQyejVwOVpQRTd4T2l6L0xTNQpYV2lXWkVkT3pMN0xBWGVCS2gzdkhnczFxMkI2d1BKZnZnS1NzWllQRGFpZTloT1NNOUJkNFNPY3JrZTRYSVBOCkVvcXVhMlYrUDRlTWJEQzhMUkVWRDdCdVZDdWdMTldWOTBoL3VJUy9WU2VOcEdUOGVScE5DakszSjc2aFlsWm8KWjNGRG5QWUY0MWpWTHhiOXF0U1ROdEp6amYwWXBEYnFWci9xZzNmQWlxbVorMzd3YWM1eHlqMDZ4cmlaRUgzZgpUM002d2lCUEVHYVlGeWN5TmNYTk5aYW9DWDJVL0N1d2JsUHAKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ=="
Expand Down Expand Up @@ -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.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## Modules

Expand Down
4 changes: 4 additions & 0 deletions modules/self-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ locals {
WINDOWS_FULL_2022_x86_64 = "windows"
AL2023_x86_64_STANDARD = "al2023"
AL2023_ARM_64_STANDARD = "al2023"
AL2023_x86_64_NEURON = "al2023"
AL2023_x86_64_NVIDIA = "al2023"
}

user_data_type = local.ami_type_to_user_data_type[var.ami_type]
Expand All @@ -43,6 +45,8 @@ locals {
WINDOWS_FULL_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_cluster_version}/image_id"
AL2023_x86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/standard/recommended/image_id"
AL2023_ARM_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/arm64/standard/recommended/image_id"
AL2023_x86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/neuron/recommended/image_id"
AL2023_x86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_cluster_version}/amazon-linux-2023/x86_64/nvidia/recommended/image_id"
}
}

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 = ">= 5.61"
version = ">= 5.70"
}
}
}
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.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## Modules

Expand Down
2 changes: 1 addition & 1 deletion tests/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data "aws_availability_zones" "available" {}

locals {
name = "ex-${replace(basename(path.cwd), "_", "-")}"
cluster_version = "1.30"
cluster_version = "1.31"
region = "eu-west-1"

vpc_cidr = "10.0.0.0/16"
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 = ">= 5.61"
version = ">= 5.70"
}
}
}
4 changes: 2 additions & 2 deletions tests/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.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.61 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.70 |

## Providers

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

## Modules

Expand Down
2 changes: 1 addition & 1 deletion tests/fargate-profile/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "aws_availability_zones" "available" {}

locals {
name = "ex-${basename(path.cwd)}"
cluster_version = "1.30"
cluster_version = "1.31"
region = "eu-west-1"

vpc_cidr = "10.0.0.0/16"
Expand Down
2 changes: 1 addition & 1 deletion tests/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 = ">= 5.61"
version = ">= 5.70"
}
}
}
Loading

0 comments on commit b2a8617

Please sign in to comment.