Control: ELB classic load balancers should have cross-zone load balancing enabled
Description
Enable cross-zone load balancing for your Elastic Load Balancers (ELBs) to help maintain adequate capacity and availability. The cross-zone load balancing reduces the need to maintain equivalent number of instances in each enabled availability zone.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.elb_classic_lb_cross_zone_load_balancing_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.elb_classic_lb_cross_zone_load_balancing_enabled --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'cross_zone_load_balancing') is null then 'ok' when (attributes_std -> 'cross_zone_load_balancing')::boolean then 'ok' else 'alarm' end status, split_part(address, '.', 2) || case when (attributes_std -> 'cross_zone_load_balancing') is null then ' cross-zone load balancing enabled' when (attributes_std -> 'cross_zone_load_balancing')::boolean then ' cross-zone load balancing enabled' else ' cross-zone load balancing disabled' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'aws_elb'