turbot/oci_insights

Query: mysql_db_system_input

Usage

powerpipe query oci_insights.query.mysql_db_system_input

SQL

select
d.display_name as label,
d.id as value,
json_build_object(
'd.id', right(reverse(split_part(reverse(d.id), '.', 1)), 8),
'd.region', region,
'oci.name', coalesce(oci.title, 'root'),
't.name', t.name
) as tags
from
oci_mysql_db_system as d
left join oci_identity_compartment as oci on d.compartment_id = oci.id
left join oci_identity_tenancy as t on d.tenant_id = t.id
where
d.lifecycle_state <> 'DELETED'
order by
d.display_name;