turbot/gcp_insights

Query: compute_instance_templates_for_iam_service_account

Usage

powerpipe query gcp_insights.query.compute_instance_templates_for_iam_service_account

SQL

select
t.id::text as template_id
from
gcp_service_account as s,
gcp_compute_instance_template as t,
jsonb_array_elements(instance_service_accounts) as tsa
where
tsa ->> 'email' = s.email
and s.name = split_part($1, '/', 1);