turbot/gcp_insights

Query: sql_database_instance_encryption_detail

Usage

powerpipe query gcp_insights.query.sql_database_instance_encryption_detail

SQL

select
k.name as "Key Name",
k.key_ring_name as "Key Ring Name",
k.primary ->> 'state' as "Key State",
k.primary ->> 'algorithm' as "Key Algorithm"
from
gcp_sql_database_instance as d,
gcp_kms_key as k
where
d.kms_key_name = concat('projects', split_part(k.self_link, 'projects', 2))
and d.self_link = $1;

Dashboards

The query is used in the dashboards: