Control: Compute virtual machine scale sets should have automatic OS image patching enabled
Description
This control checks whether virtual machine scale sets have automatic OS image patching enabled.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.compute_vm_scale_set_automatic_upgrade_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.compute_vm_scale_set_automatic_upgrade_enabled --share
SQL
This control uses a named query:
select a.id as resource, case when upgrade_policy is null then 'skip' when upgrade_policy ->> 'mode' = 'Automatic' then 'ok' else 'alarm' end as status, case when upgrade_policy is null then a.title || ' upgrade policy not applicable.' when upgrade_policy ->> 'mode' = 'Automatic' then a.title || ' automatic update enabled.' else a.title || ' automatic update disabled.' end as reason , a.resource_group as resource_group , sub.display_name as subscriptionfrom azure_compute_virtual_machine_scale_set as a, azure_subscription as subwhere sub.subscription_id = a.subscription_id;