turbot/aws_insights

Query: ecs_clusters_for_codepipeline_pipeline

Usage

powerpipe query aws_insights.query.ecs_clusters_for_codepipeline_pipeline

SQL

select
cluster_arn as ecs_cluster_arn
from
aws_ecs_cluster
where
cluster_name in (
select
a -> 'Configuration' ->> 'ClusterName'
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' = 'ECS'
and arn = $1
);