turbot/oci_insights

Query: oci_vcn_subnet_flow_logs_report

Usage

powerpipe query oci_insights.query.oci_vcn_subnet_flow_logs_report

SQL

select
s.display_name as "Name",
case
when l.is_enabled is null or not l.is_enabled then null
else 'Enabled'
end as "Flow Logs Status",
t.title as "Tenancy",
coalesce(c.title, 'root') as "Compartment",
s.region as "Region",
s.id as "OCID"
from
oci_core_subnet as s
left join oci_logging_log as l on s.id = l.configuration -> 'source' ->> 'resource'
left join oci_identity_compartment as c on s.compartment_id = c.id
left join oci_identity_tenancy as t on s.tenant_id = t.id
where
s.lifecycle_state <> 'TERMINATED'
order by
s.display_name;

Dashboards

The query is used in the dashboards: