turbot/steampipe-mod-terraform-azure-compliance

Control: Windows Virtual machines and scale sets should have automatic updates enabled

Description

This control checks whether windows virtual machine and scale sets have automatic updates enabled.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.compute_vm_automatic_updates_enabled_windows

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_azure_compliance.control.compute_vm_automatic_updates_enabled_windows --share

SQL

This control uses a named query:

select
address as resource,
case
when not (attributes_std ->> 'enable_automatic_updates')::boolean then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when not (attributes_std ->> 'enable_automatic_updates')::boolean then ' automatic updates disabled'
else ' automatic updates enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type in ('azurerm_windows_virtual_machine', 'azurerm_windows_virtual_machine_scale_set');

Tags