turbot/aws_insights

Query: ec2_network_load_balancer_deletion_protection

Usage

powerpipe query aws_insights.query.ec2_network_load_balancer_deletion_protection

SQL

select
'Deletion Protection' as label,
case when lb ->> 'Value' = 'false' then 'Disabled' else 'Enabled' end as value,
case when lb ->> 'Value' = 'false' then 'alert' else 'ok' end as type
from
aws_ec2_network_load_balancer
cross join jsonb_array_elements(load_balancer_attributes) as lb
where
lb ->> 'Key' = 'deletion_protection.enabled'
and aws_ec2_network_load_balancer.arn = $1;

Dashboards

The query is used in the dashboards: