turbot/aws_well_architected

Query: wellarchitected_lens_input

Usage

powerpipe query aws_well_architected.query.wellarchitected_lens_input

SQL

select
l.title as label,
l.arn as value,
json_build_object(
'account_id', l.account_id,
'region', l.region,
'lens_alias', l.lens_alias
) as tags
from
aws_wellarchitected_workload w,
aws_wellarchitected_lens l,
jsonb_array_elements_text(w.lenses) la
where
(la = l.lens_alias or la = l.arn)
and l.account_id = w.account_id
and l.region = w.region
and w.workload_id = $1
order by
l.title;