Skip to content

Commit a1d2760

Browse files
committed
fix(terraform): CKV_AWS_339 - Update supported EKS platform versions
Update list of supported EKS platform versions to include 1.33 and remove versions that are no longer receiving extended support.
1 parent afbfd7b commit a1d2760

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

checkov/terraform/checks/resource/aws/EKSPlatformVersion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_inspected_key(self) -> str:
2525

2626
def get_expected_values(self) -> list[Any]:
2727
# https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
28-
return ["1.25", "1.26", "1.27", "1.28", "1.29", "1.30", "1.31", "1.32", "1.33"]
28+
return ["1.28", "1.29", "1.30", "1.31", "1.32", "1.33"]
2929

3030

3131
check = EKSPlatformVersion()

tests/terraform/checks/resource/aws/example_EKSPlatformVersion/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "aws_eks_cluster" "pass2" {
2222
subnet_ids = [aws_subnet.example1.id, aws_subnet.example2.id]
2323
}
2424

25-
version="1.25"
25+
version = "1.33"
2626
# Ensure that IAM Role permissions are created before and deleted after EKS Cluster handling.
2727
# Otherwise, EKS will not be able to properly delete EKS managed EC2 infrastructure such as Security Groups.
2828
depends_on = [
@@ -39,12 +39,12 @@ resource "aws_eks_cluster" "fail" {
3939
subnet_ids = [aws_subnet.example1.id, aws_subnet.example2.id]
4040
}
4141

42-
version="1.21"
42+
version = "1.21"
4343

4444
# Ensure that IAM Role permissions are created before and deleted after EKS Cluster handling.
4545
# Otherwise, EKS will not be able to properly delete EKS managed EC2 infrastructure such as Security Groups.
4646
depends_on = [
4747
aws_iam_role_policy_attachment.example-AmazonEKSClusterPolicy,
4848
aws_iam_role_policy_attachment.example-AmazonEKSVPCResourceController,
4949
]
50-
}
50+
}

0 commit comments

Comments
 (0)