turbot/oci_insights

Query: oci_vcn_security_groups_by_tenancy

Usage

powerpipe query oci_insights.query.oci_vcn_security_groups_by_tenancy

SQL

select
c.title as "Tenancy",
count(sg.*) as "Security Groups"
from
oci_core_network_security_group as sg,
oci_identity_tenancy as c
where
c.id = sg.tenant_id and lifecycle_state <> 'TERMINATED'
group by
c.title
order by
c.title;

Dashboards

The query is used in the dashboards: