turbot/steampipe-mod-oci-insights

Dashboard: OCI VCN Network Security Group Detail

This dashboard answers the following questions for each security group:

  • How is the security group configured?
  • What tags are applied?
  • What are the ingress and egress rules?
  • How are the route tables configured?
  • What relationships does the security group have with other resources?
This dashboard contains 4 cards, 1 graph, 1 input and 5 tables.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-oci-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select OCI VCN Network Security Group Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run oci_insights.dashboard.vcn_network_security_group_detail --share

Queries

This dashboard uses the the following queries:
with nsg_vnic_attachment as (
select
jsonb_array_elements_text(nsg_ids) as n_id,
instance_id as instance_id
from
oci_core_vnic_attachment
)
-- Compute Instance
select
i.title as "Title",
'oci_core_instance' as "Type",
i.id as "ID",
'/oci_insights.dashboard.compute_instance_detail?input.instance_id=' || i.id as link
from
nsg_vnic_attachment as g
left join oci_core_network_security_group as nsg on g.n_id = nsg.id
left join oci_core_instance as i on i.id = g.instance_id
where
nsg.id = $1
-- File Storage Mount Target
union all
select
title as "Title",
'oci_file_storage_mount_target' as "Type",
id as "ID",
null as link
from
oci_file_storage_mount_target,
jsonb_array_elements_text(nsg_ids) as sg
where
sg = $1
-- Load Balancer
union all
select
title as "Title",
'oci_core_load_balancer' as "Type",
id as "ID",
null as link
from
oci_core_load_balancer,
jsonb_array_elements_text(network_security_group_ids) as sg
where
sg = $1
-- Network Load Balancer
union all
select
title as "Title",
'oci_core_network_load_balancer' as "Type",
id as "ID",
null as link
from
oci_core_network_load_balancer,
jsonb_array_elements_text(network_security_group_ids) as sg
where
sg = $1

Tags