Control: ELB classic load balancers should use SSL certificates
Description
Because sensitive data can exist and to help protect data at transit, ensure encryption is enabled for your Elastic Load Balancing.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.elb_classic_lb_use_ssl_certificateSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.elb_classic_lb_use_ssl_certificate --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'listener') is null then 'skip'    when (attributes_std -> 'listener' ->> 'lb_protocol') ilike 'SSL' and (attributes_std -> 'listener' -> 'ssl_certificate_id') is null then 'alarm'    when (attributes_std -> 'listener' ->> 'lb_protocol') ilike 'SSL' and (attributes_std -> 'listener' ->> 'ssl_certificate_id') like 'arn:aws:acm%' then 'ok'    else 'alarm'  end status,  split_part(address, '.', 2) || case    when (attributes_std -> 'listener') is null then ' has no listener'    when (attributes_std -> 'listener' ->> 'lb_protocol') ilike 'SSL' and (attributes_std -> 'listener' -> 'ssl_certificate_id') is null then ' does not use certificate provided by ACM'    when (attributes_std -> 'listener' ->> 'lb_protocol') ilike 'SSL' and (attributes_std -> 'listener' ->> 'ssl_certificate_id') like 'arn:aws:acm%' then ' uses certificates provided by ACM'    else ' does not use certificate provided by ACM'  end || '.' reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'aws_elb';