turbot/aws_compliance

Query: eks_cluster_no_default_vpc

Usage

powerpipe query aws_compliance.query.eks_cluster_no_default_vpc

Steampipe Tables

SQL

with default_vpc_cluster as (
select
distinct c.arn
from
aws_eks_cluster as c
left join aws_vpc as v on v.vpc_id = c.resources_vpc_config ->> 'VpcId'
where
v.is_default
)
select
c.arn as resource,
case
when v.arn is not null then 'alarm'
else 'ok'
end as status,
case
when v.arn is not null then title || ' uses default VPC.'
else title || ' does not use default VPC.'
end as reason
, c.region, c.account_id
from
aws_eks_cluster as c
left join default_vpc_cluster as v on v.arn = c.arn;

Controls

The query is being used by the following controls: