Skip to content

Commit

Permalink
Update autoscaling_group_with_lb_use_healthcheck query to skip groups…
Browse files Browse the repository at this point in the history
… that aren't associated with a load balancer. Closes #24 (#30)
  • Loading branch information
khushboo9024 authored May 25, 2021
1 parent 262e798 commit 46c36f0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions query/autoscaling/autoscaling_group_with_lb_use_healthcheck.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ select
-- Required Columns
autoscaling_group_arn as resource,
case
when load_balancer_names is null and target_group_arns is null then 'alarm'
when health_check_type != 'ELB' then 'alarm'
else 'ok'
end status,
case
when load_balancer_names is not null and health_check_type = 'ELB' then title || ' using ELB health checks.'
when load_balancer_names is not null and health_check_type = 'EC2' then title || ' using EC2 health checks.'
else title || ' not associated with a load balancer.'
end reason,
end as status,
case
when load_balancer_names is null and target_group_arns is null then title || ' not associated with a load balancer.'
when health_check_type != 'ELB' then title || ' does not use ELB health check.'
else title || ' uses ELB health check.'
end as reason,
-- Additional Dimensions
region,
account_id
Expand Down

0 comments on commit 46c36f0

Please sign in to comment.