Control: Network Application Gateway with Autoscaling Disabled
Description
Application Gateways should use autoscaling when supported by the SKU tier, and fixed capacity should be reviewed for optimization opportunities.
Usage
Run the control in your terminal:
powerpipe control run azure_thrifty.control.network_application_gateway_with_autoscaling_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_thrifty.control.network_application_gateway_with_autoscaling_disabled --share
Steampipe Tables
SQL
select ag.id as resource, case when ag.autoscale_configuration is not null then 'ok' when ag.sku->>'tier' in ('Standard_v2', 'WAF_v2') and ag.autoscale_configuration is null then 'alarm' when (ag.sku->>'capacity')::int > 2 and ag.autoscale_configuration is null then 'alarm' else 'ok' end as status, case when ag.autoscale_configuration is not null then ag.name || ' has autoscaling enabled with min capacity ' || (ag.autoscale_configuration->>'minCapacity') || ' and max capacity ' || (ag.autoscale_configuration->>'maxCapacity') || '.' when ag.sku->>'tier' in ('Standard_v2', 'WAF_v2') then ag.name || ' uses ' || (ag.sku->>'tier') || ' tier which supports autoscaling but it is not enabled.' when (ag.sku->>'capacity')::int > 2 and ag.autoscale_configuration is null then ag.name || ' has high fixed capacity (' || (ag.sku->>'capacity') || ') without autoscaling.' else ag.name || ' has appropriate capacity configuration.' end as reason , ag.resource_group , display_name as subscriptionfrom azure_application_gateway as ag, azure_subscription as subwhere sub.subscription_id = ag.subscription_id and ag.operational_state = 'Running';