turbot/azure_thrifty

Control: Unused virtual network gateways should be removed

Description

Virtual network gateways that have been idle/no connection for more than 90 days should be reviewed as these gateways are billed hourly, you should consider reconfiguring or deleting them if you don't intend to use them anymore.

Usage

Run the control in your terminal:

powerpipe control run azure_thrifty.control.virtual_network_gateway_unused

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_thrifty.control.virtual_network_gateway_unused --share

Steampipe Tables

SQL

select
gateway.id as resource,
case
when gateway_connections is null then 'alarm'
else 'ok'
end as status,
case
when gateway_connections is null then gateway.title || ' has no connections.'
else gateway.title || ' has connections.'
end as reason
, gateway.resource_group
, display_name as subscription
from
azure_virtual_network_gateway as gateway,
azure_subscription as sub
where
sub.subscription_id = gateway.subscription_id;

Tags