Control: EKS cluster should run on supported Kubernetes version
Description
Ensure Amazon EKS cluster is running on supported Kubernetes version.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.eks_cluster_run_on_supported_kubernetes_version
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.eks_cluster_run_on_supported_kubernetes_version --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std ->> 'version') is null then 'skip' when (attributes_std ->> 'version') like any (array ['1.22', '1.23', '1.24', '1.25', '1.26']) then 'ok' else 'alarm' end status, split_part(address, '.', 2) || case when (attributes_std ->> 'version') is null then ' Kubernetes version not set' when (attributes_std ->> 'version') like any (array ['1.22', '1.23', '1.24', '1.25', '1.26']) then ' run on supported Kubernetes version' else ' do not run on supported Kubernetes version' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'aws_eks_cluster';