turbot/steampipe-mod-azure-compliance

Query: appservice_web_app_worker_more_than_one

Usage

powerpipe query azure_compliance.query.appservice_web_app_worker_more_than_one

SQL

select
p ->> 'ID' as resource,
case
when (
p -> 'SiteProperties' -> 'siteConfig' ->> 'numberOfWorkers'
) :: int > 1 then 'ok'
else 'alarm'
end as status,
a.name || ' has ' || (
p -> 'SiteProperties' -> 'siteConfig' ->> 'numberOfWorkers'
) || ' no of worker(s).' as reason,
a.resource_group as resource_group,
sub.display_name as subscription
from
azure_app_service_plan as a
cross join lateral jsonb_array_elements(a.apps) as p
left join azure_subscription as sub on sub.subscription_id = a.subscription_id;

Controls

The query is being used by the following controls: