turbot/steampipe-mod-alicloud-insights

Dashboard: AliCloud VPC vSwitch Detail

his dashboard answers the following questions for each vSwitch:

  • How is the vSwitch configured?
  • What relationships does the vSwitch have with other resources?
  • What tags are applied?
  • What are the resources launched in the vSwitch?
This dashboard contains 3 cards, 1 graph, 1 input and 3 tables.

Usage

Install the mod:

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

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select AliCloud VPC vSwitch Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run alicloud_insights.dashboard.vpc_vswitch_detail --share

Queries

This dashboard uses the the following queries:
-- ECS instances
select
i.title as "Title",
'alicloud_ecs_instance' as "Type",
i.arn as "ARN",
'/alicloud_insights.dashboard.ecs_instance_detail?input.instance_arn=' || arn as link
from
alicloud_ecs_instance as i
join alicloud_vpc_vswitch as s on s.vpc_id = i.vpc_id
where
s.vswitch_id = $1
-- RDS DB Instances
union all
select
title as "Title",
'alicloud_rds_instance' as "Type",
arn as "ARN",
'/alicloud_insights.dashboard.rds_instance_detail?input.db_instance_arn=' || arn as link
from
alicloud_rds_instance
where
vswitch_id = $1
-- Network ACLs
union all
select
a.title as "Title",
'alicloud_vpc_network_acl' as "Type",
v.network_acl_id as "ID",
null as link
from
alicloud_vpc_vswitch as v,
alicloud_vpc_network_acl as a
where
vswitch_id = $1
and v.network_acl_id is not null
and v.network_acl_id = a.network_acl_id
-- Route Tables
union all
select
title as "Title",
'alicloud_vpc_route_table' as "Type",
route_table_id as "ID",
null as link
from
alicloud_vpc_route_table,
jsonb_array_elements_text(vswitch_ids) as b
where
b = $1
and route_table_id is not null;

Tags