turbot/gcp_insights

Query: iam_policies_for_iam_service_account

Usage

powerpipe query gcp_insights.query.iam_policies_for_iam_service_account

Steampipe Tables

SQL

select
title as policy_id
from
gcp_iam_policy,
jsonb_array_elements(bindings) as b,
jsonb_array_elements_text(b -> 'members') as m,
split_part(m,'serviceAccount:',2) as member_name
where
m like 'serviceAccount:%'
and member_name = split_part($1, '/', 1);