turbot/aws_insights

Query: codebuild_projects_for_codepipeline_pipeline

Usage

powerpipe query aws_insights.query.codebuild_projects_for_codepipeline_pipeline

SQL

select
arn as codebuild_project_arn
from
aws_codebuild_project
where
name in (
select
a -> 'Configuration' ->> 'ProjectName'
from
aws_codepipeline_pipeline,
jsonb_array_elements(stages) as s,
jsonb_array_elements(s -> 'Actions') as a
where
s ->> 'Name' = 'Build'
and a -> 'ActionTypeId' ->> 'Provider' = 'CodeBuild'
and arn = $1
);