turbot/aws_insights

Query: ecr_repositories_for_codebuild_project

Usage

powerpipe query aws_insights.query.ecr_repositories_for_codebuild_project

SQL

with project_image_details as (
select
split_part(environment ->> 'Image', ':', 1) as image_uri
from
aws_codebuild_project
where
account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
and arn = $1
)
select
r.arn as ecr_repository_arn
from
aws_ecr_repository r,
project_image_details pid
where
r.repository_uri = pid.image_uri
and r.arn is not null;