turbot/gcp_insights

Query: primary_sql_database_instances_for_sql_database_instance

Usage

powerpipe query gcp_insights.query.primary_sql_database_instances_for_sql_database_instance

SQL

select
replace(self_link, name, split_part(master_instance_name, ':', 2)) as self_link
from
gcp_sql_database_instance
where
master_instance_name is not null
and self_link = $1
and project = split_part($1, '/', 7);