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 terraform_azure_compliance.control.compute_vm_scale_set_automatic_os_upgrade_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.compute_vm_scale_set_automatic_os_upgrade_enabled --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'automatic_os_upgrade_policy' ->> 'enable_automatic_os_upgrade') = 'true' then 'ok' else 'alarm' end status, split_part(address, '.', 2) || case when (attributes_std -> 'automatic_os_upgrade_policy' ->> 'enable_automatic_os_upgrade') = 'true' then ' automatic OS upgrade enabled' else ' automatic OS upgrade disabled' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type in ('azurerm_linux_virtual_machine_scale_set', 'azurerm_windows_virtual_machine_scale_set');