Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update EKS module version to v20.0 #1871

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-parallel-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.0
terraform_version: 1.3.10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EKS module now requires MSTV of 1.3 so updating this in our e2e tests as well


- name: Terraform Destroy
working-directory: ${{ matrix.example_path }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-parallel-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ jobs:
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.0
terraform_version: 1.3.10


- name: Terraform Apply
id: apply
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.5
rev: v1.86.0
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand All @@ -29,6 +29,7 @@ repos:
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_unused_required_providers'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nifty little lint check to make sure we remove providers when they aren't being utilized

- '--args=--only=terraform_workspace_remote'
- id: terraform_validate
exclude: (docs|modules)
16 changes: 2 additions & 14 deletions patterns/agones-game-controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@ provider "aws" {
region = local.region
}

provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
}
}

provider "helm" {
kubernetes {
host = module.eks.cluster_endpoint
Expand All @@ -34,7 +22,7 @@ locals {
name = basename(path.cwd)
region = "us-west-2"

cluster_version = "1.27"
cluster_version = "1.29"

vpc_cidr = "10.0.0.0/16"
azs = slice(data.aws_availability_zones.available.names, 0, 3)
Expand All @@ -54,7 +42,7 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = local.cluster_version
Expand Down
8 changes: 2 additions & 6 deletions patterns/agones-game-controller/versions.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.9"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.20"
}
}

# ## Used for end-to-end testing on project; update to suit your needs
Expand Down
16 changes: 2 additions & 14 deletions patterns/appmesh-mtls/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@ provider "aws" {
region = local.region
}

provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
}
}

provider "helm" {
kubernetes {
host = module.eks.cluster_endpoint
Expand Down Expand Up @@ -66,10 +54,10 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = "1.27"
cluster_version = "1.29"
cluster_endpoint_public_access = true

vpc_id = module.vpc.vpc_id
Expand Down
8 changes: 2 additions & 6 deletions patterns/appmesh-mtls/versions.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.9"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.20"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14"
Expand Down
5 changes: 2 additions & 3 deletions patterns/aws-vpc-cni-network-policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = "1.27" # Must be 1.25 or higher
cluster_version = "1.29" # Must be 1.25 or higher
cluster_endpoint_public_access = true

vpc_id = module.vpc.vpc_id
Expand Down Expand Up @@ -118,7 +118,6 @@ module "addons" {
coredns = {}
kube-proxy = {}
vpc-cni = {
preserve = true
most_recent = true # Must be 1.14.0 or higher

timeouts = {
Expand Down
4 changes: 2 additions & 2 deletions patterns/aws-vpc-cni-network-policy/versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
Expand Down
4 changes: 0 additions & 4 deletions patterns/blue-green-upgrade/eks-blue/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@ terraform {
source = "hashicorp/helm"
version = ">= 2.9.0"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14"
}
}
}
4 changes: 0 additions & 4 deletions patterns/blue-green-upgrade/eks-green/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@ terraform {
source = "hashicorp/helm"
version = ">= 2.9.0"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14"
}
}
}
31 changes: 4 additions & 27 deletions patterns/elastic-fabric-adapter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ locals {
name = basename(path.cwd)
region = "us-west-2"

cluster_version = "1.27"
cluster_version = "1.29"

vpc_cidr = "10.0.0.0/16"
azs = slice(data.aws_availability_zones.available.names, 0, 3)
Expand All @@ -51,7 +51,7 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = local.cluster_version
Expand Down Expand Up @@ -127,29 +127,6 @@ module "eks" {
group_name = aws_placement_group.efa.name
}

pre_bootstrap_user_data = <<-EOT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is available by default today through 1.25+ and will soon be available through 1.23+

EFA_BIN='/opt/amazon/efa/bin/'
# EFA driver is installed by default on EKS GPU AMI starting on EKS 1.28
if [ ! -s "$EFA_BIN" ]; then
# Install EFA
# Note: It is recommended to install the EFA driver on a custom AMI and
# not rely on dynamic installation during instance provisioning in user data
curl -O https://efa-installer.amazonaws.com/aws-efa-installer-latest.tar.gz
tar -xf aws-efa-installer-latest.tar.gz && cd aws-efa-installer
./efa_installer.sh -y --minimal
cd .. && rm -rf aws-efa-installer*
# Not required - just displays info on the EFA interfaces
$EFA_BIN/fi_info -p efa
# Disable ptrace
sysctl -w kernel.yama.ptrace_scope=0
fi
EOT

taints = {
dedicated = {
key = "nvidia.com/gpu"
Expand All @@ -169,7 +146,7 @@ module "eks" {

module "eks_blueprints_addons" {
source = "aws-ia/eks-blueprints-addons/aws"
version = "~> 1.0"
version = "~> 1.14"

cluster_name = module.eks.cluster_name
cluster_endpoint = module.eks.cluster_endpoint
Expand Down Expand Up @@ -275,7 +252,7 @@ resource "kubernetes_daemonset" "aws_efa_k8s_device_plugin" {

container {
name = "aws-efa-k8s-device-plugin"
image = "602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-efa-k8s-device-plugin:v0.3.3"
image = "602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-efa-k8s-device-plugin:v0.4.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was updated recently for some CVE fixes https://github.com/aws-samples/aws-efa-eks/pull/21/files


volume_mount {
name = "device-plugin"
Expand Down
4 changes: 2 additions & 2 deletions patterns/elastic-fabric-adapter/versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
Expand Down
18 changes: 3 additions & 15 deletions patterns/external-secrets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@ provider "aws" {
region = local.region
}

provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)

exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
}
}

provider "helm" {
kubernetes {
host = module.eks.cluster_endpoint
Expand Down Expand Up @@ -70,10 +58,10 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = "1.27"
cluster_version = "1.29"
cluster_endpoint_public_access = true

vpc_id = module.vpc.vpc_id
Expand All @@ -98,7 +86,7 @@ module "eks" {

module "eks_blueprints_addons" {
source = "aws-ia/eks-blueprints-addons/aws"
version = "~> 1.0"
version = "~> 1.14"

cluster_name = module.eks.cluster_name
cluster_endpoint = module.eks.cluster_endpoint
Expand Down
8 changes: 2 additions & 6 deletions patterns/external-secrets/versions.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.9"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.20"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14"
Expand Down
6 changes: 3 additions & 3 deletions patterns/fargate-serverless/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = "1.27"
cluster_version = "1.29"
cluster_endpoint_public_access = true

vpc_id = module.vpc.vpc_id
Expand Down Expand Up @@ -92,7 +92,7 @@ module "eks" {

module "eks_blueprints_addons" {
source = "aws-ia/eks-blueprints-addons/aws"
version = "~> 1.0"
version = "~> 1.14"

cluster_name = module.eks.cluster_name
cluster_endpoint = module.eks.cluster_endpoint
Expand Down
4 changes: 2 additions & 2 deletions patterns/fargate-serverless/versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.47"
version = ">= 5.34"
}
helm = {
source = "hashicorp/helm"
Expand Down
4 changes: 2 additions & 2 deletions patterns/fully-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ locals {

module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 19.16"
version = "~> 20.0"

cluster_name = local.name
cluster_version = "1.27"
cluster_version = "1.29"

# EKS Addons
cluster_addons = {
Expand Down
Loading
Loading