turbot/aws_insights

Query: elastic_beanstalk_applications_for_codepipeline_pipeline

Usage

powerpipe query aws_insights.query.elastic_beanstalk_applications_for_codepipeline_pipeline

SQL

select
arn as beanstalk_app_arn
from
aws_elastic_beanstalk_application
where
name in (
select
a -> 'Configuration' ->> 'ApplicationName'
from
aws_codepipeline_pipeline,
jsonb_array_elements(stages) as s,
jsonb_array_elements(s -> 'Actions') as a
where
s ->> 'Name' = 'Deploy'
and a -> 'ActionTypeId' ->> 'Provider' = 'ElasticBeanstalk'
and arn = $1
);