Control: Web app should have more than one worker
Description
It is recommended to have more than one worker for failover. This control is non-compliant if Web apps have one or less than one worker.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.appservice_web_app_worker_more_than_one
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.appservice_web_app_worker_more_than_one --share
SQL
This control uses a named query:
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 subscriptionfrom azure_app_service_plan as a, jsonb_array_elements(apps) as p, azure_subscription as subwhere sub.subscription_id = a.subscription_id;