Control: ELB application load balancer deletion protection should be enabled
Description
This rule ensures that Elastic Load Balancing has deletion protection enabled.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.elb_application_lb_deletion_protection_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.elb_application_lb_deletion_protection_enabled --shareSQL
This control uses a named query:
select  arn as resource,  case    when load_balancer_attributes @> '[{"Key": "deletion_protection.enabled", "Value": "true"}]' then 'ok'    else 'alarm'  end as status,  case    when load_balancer_attributes @> '[{"Key": "deletion_protection.enabled", "Value": "true"}]' then title || ' deletion protection enabled.'    else title || ' deletion protection disabled.'  end as reason    , region, account_idfrom  aws_ec2_application_load_balancer;