Control: VPC should be configured to use VPC endpoints
Description
Checks if Service Endpoint for the service provided in rule parameter is created for each AWS Virtual Private Cloud (AWS VPC). The rule is non-compliant if an AWS VPC doesn't have an AWS VPC endpoint created for the service.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.vpc_configured_to_use_vpc_endpointsSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.vpc_configured_to_use_vpc_endpoints --shareSQL
This control uses a named query:
select  arn as resource,  case    when vpc_id not in (      select        vpc_id      from        aws_vpc_endpoint      where        service_name like 'com.amazonaws.' || region || '.ec2'    ) then 'alarm'    else 'ok'  end as status,  case    when vpc_id not in (      select        vpc_id      from        aws_vpc_endpoint      where        service_name like 'com.amazonaws.' || region || '.ec2'    ) then title || ' not configured to use VPC endpoints.'    else title || ' configured to use VPC endpoints.'  end as reason    , region, account_idfrom  aws_vpc;