turbot/terraform_aws_compliance

Query: elb_classic_lb_use_ssl_certificate

Usage

powerpipe query terraform_aws_compliance.query.elb_classic_lb_use_ssl_certificate

Steampipe Tables

SQL

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_line
from
terraform_resource
where
type = 'aws_elb';

Controls

The query is being used by the following controls: