turbot/steampipe-mod-aws-compliance

Control: VPCs should be configured with an interface endpoint for Docker Registry

Description

This control checks whether a virtual private cloud (VPC) that you manage has an interface VPC endpoint for Docker Registry. The control fails if the VPC doesn't have an interface VPC endpoint for Docker Registry. This control evaluates resources in a single account.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.vpc_configured_to_use_interface_endpoint_for_docker_registry

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.vpc_configured_to_use_interface_endpoint_for_docker_registry --share

SQL

This control uses a named query:

with vpc_endpoints as (
select distinct
vpc_id
from
aws_vpc_endpoint
where
service_name like 'com.amazonaws.' || region || '.ecr.dkr'
)
select
v.arn as resource,
case
when e.vpc_id is null then 'alarm'
else 'ok'
end as status,
case
when e.vpc_id is null then v.title || ' not configured to use interface endpoint for docker registry.'
else v.title || ' configured to use interface endpoint for docker registry.'
end as reason
, region, account_id
from
aws_vpc v left join vpc_endpoints e using (vpc_id);

Tags