turbot/terraform_aws_compliance

Query: autoscaling_group_with_lb_use_health_check

Usage

powerpipe query terraform_aws_compliance.query.autoscaling_group_with_lb_use_health_check

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'load_balancers') is null
and (attributes_std -> 'target_group_arns') is null then 'alarm'
when (attributes_std ->> 'health_check_type') <> 'ELB' then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'load_balancers') is null
and (attributes_std -> 'target_group_arns') is null then ' not associated with a load balancer'
when (attributes_std ->> 'health_check_type') <> 'ELB' then ' does not use ELB health check'
else ' uses ELB health check'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'aws_autoscaling_group';

Controls

The query is being used by the following controls: