turbot/steampipe-mod-aws-insights

Dashboard: AWS VPC Subnet Detail

This dashboard answers the following questions for each subnet:

  • How is the subnet configured?
  • What tags are applied?
  • What are the resources launched in the subnet?
  • What relationships does the subnet have with other resources?
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-aws-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select AWS VPC Subnet Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run aws_insights.dashboard.vpc_subnet_detail --share

Queries

This dashboard uses the the following queries:
-- EC2 instances
select
title as "Title",
'aws_ec2_instance' as "Type",
arn as "ARN",
'/aws_insights.dashboard.ec2_instance_detail?input.instance_arn=' || arn as link
from
aws_ec2_instance
where
subnet_id = $1
-- Lambda functions
union all
select
title as "Title",
'aws_lambda_function' as "Type",
arn as "ARN",
'/aws_insights.dashboard.lambda_function_detail?input.lambda_arn=' || arn as link
from
aws_lambda_function,
jsonb_array_elements(vpc_subnet_ids) as s
where
trim((s::text ), '""') = $1
-- Sagemaker Notebook Instances
union all
select
title as "Title",
'aws_sagemaker_notebook_instance' as "Type",
arn as "ARN",
null as link
from
aws_sagemaker_notebook_instance
where
subnet_id = $1
-- RDS DB Instances
union all
select
title as "Title",
'aws_rds_db_instance' as "Type",
arn as "ARN",
'/aws_insights.dashboard.rds_db_instance_detail?input.db_instance_arn=' || arn as link
from
aws_rds_db_instance,
jsonb_array_elements(subnets) as s
where
s ->> 'SubnetIdentifier' = $1
-- Network ACLs
union all
select
title as "Title",
'aws_vpc_network_acl' as "Type",
network_acl_id as "ID",
null as link
from
aws_vpc_network_acl,
jsonb_array_elements(associations) as a
where
a ->> 'SubnetId' = $1
-- Route Tables
union all
select
title as "Title",
'aws_vpc_route_table' as "Type",
route_table_id as "ID",
null as link
from
aws_vpc_route_table,
jsonb_array_elements(associations) as a
where
a ->> 'SubnetId' = $1;

Tags