Control: EKS clusters should not use multiple security groups
Description
This controls ensures that EKS clusters is not using multiple security groups.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.eks_cluster_no_multiple_security_groups
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.eks_cluster_no_multiple_security_groups --share
SQL
This control uses a named query:
select arn as resource, case when jsonb_array_length(resources_vpc_config -> 'SecurityGroupIds') > 1 then 'alarm' else 'ok' end as status, title || ' has '|| jsonb_array_length(resources_vpc_config -> 'SecurityGroupIds') || ' security group(s).' as reason , region, account_idfrom aws_eks_cluster;