IBM Account ReportIBM Block Storage Volume Age ReportIBM Block Storage Volume DashboardIBM Block Storage Volume DetailIBM Block Storage Volume Encryption ReportIBM Compute Instance Age ReportIBM Compute Instance DashboardIBM Compute Instance DetailIBM Compute Instance Disk Age ReportIBM Compute Instance Disk DashboardIBM Compute Instance Disk DetailIBM KMS Key Age ReportIBM KMS Key DashboardIBM KMS Key DetailIBM Security Group Age ReportIBM Security Group DashboardIBM Security Group DetailIBM VPC Age ReportIBM VPC DashboardIBM VPC Detail
Dashboard: IBM VPC Detail
This dashboard answers the following questions for each VPC:
- How is the VPC configured?
- What tags are applied?
- What are the address prefixes assigned to?
- What are the subnets attached to?
- What are the cloud service endpoint source addresses?
- How security groups and network ACLs are configured?
This dashboard contains 2 cards, 2 flows, 1 input and 7 tables.
Usage
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/steampipe-mod-ibm-insights
Start the Powerpipe server:
steampipe service startpowerpipe server
Open http://localhost:9033 in your browser and select IBM VPC Detail dashboard.
You could also snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe dashboard run ibm_insights.dashboard.ibm_vpc_detail --share
Queries
This dashboard uses the the following queries:
with aces as ( select crn, title, id as network_acl_id, e ->> 'protocol' as protocol, e ->> 'source' as cidr_block, e ->> 'action' as rule_action, e -> 'name' as rule_name,
case when e ->> 'action' = 'allow' then 'Allow ' else 'Deny ' end || case when e ->>'protocol' = 'all' then 'All Traffic' when e ->>'protocol' = 'icmp' then 'All ICMP' when e ->>'protocol' = 'udp' and e ->> 'source_port_min' = '1' and e ->> 'source_port_max' = '65535' then 'All UDP' when e ->>'protocol' = 'tcp' and e ->>'source_port_min' = '1' and e ->>'source_port_max' = '65535' then 'All TCP' when e ->>'protocol' = 'tcp' and e ->> 'source_port_min' = e ->> 'source_port_max' then concat(e ->> 'source_port_min', '/TCP') when e->>'protocol' = 'udp' and e ->> 'source_port_min' = e ->> 'source_port_max' then concat(e->> 'source_port_min', '/UDP') when e->>'protocol' = 'tcp' and e ->> 'source_port_min' <> e->> 'source_port_max' then concat(e ->> 'source_port_min', '-', e ->> 'source_port_max', '/TCP') when e->>'protocol' = 'udp' and e ->> 'source_port_min' <> e->> 'source_port_max' then concat(e ->> 'source_port_min', '-', e ->> 'source_port_max', '/udp') else concat('Procotol: ', e->>'protocol') end as rule_description, a ->> 'id' as subnet_id from ibm_is_network_acl, jsonb_array_elements(rules) as e, jsonb_array_elements(subnets) as a where vpc ->> 'crn' = $1 and e ->> 'direction' = 'inbound'
)-- CIDR Nodesselect distinct cidr_block as id, cidr_block as title, 'cidr_block' as category, null as from_id, null as to_idfrom aces
-- Rule Nodesunion select concat(network_acl_id, '_', rule_name) as id, rule_description as title, 'rule' as category, null as from_id, null as to_idfrom aces
-- ACL Nodesunion select distinct s.network_acl_id as id, acl.name as title, 'nacl' as category, null as from_id, null as to_idfrom aces as s left join ibm_is_network_acl as acl on s.network_acl_id = acl.id
-- Subnet nodeunion select distinct a.subnet_id as id, s.name as title, 'subnet' as category, null as from_id, null as to_idfrom aces as a left join ibm_is_subnet as s on s.id = a.subnet_id
-- ip -> rule edgeunion select null as id, null as title, rule_action as category, cidr_block as from_id, concat(network_acl_id, '_', rule_name) as to_idfrom aces
-- rule -> NACL edgeunion select null as id, null as title, rule_action as category, concat(network_acl_id, '_', rule_name) as from_id, network_acl_id as to_idfrom aces
-- nacl -> subnet edgeunion select null as id, null as title, 'attached' as category, network_acl_id as from_id, subnet_id as to_idfrom aces;
{ "$1": "crn"}