turbot/steampipe-mod-terraform-azure-compliance

Control: Virtual machines and scale sets should have agent installed

Description

This control checks whether windows virtual machine and scale sets have agent installed.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.compute_vm_and_scale_set_agent_installed

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'provision_vm_agent') = 'false' then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'provision_vm_agent') = 'false' then ' agent not installed'
else ' agent installed'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type in ('azurerm_linux_virtual_machine_scale_set', 'azurerm_windows_virtual_machine_scale_set', 'azurerm_windows_virtual_machine', 'azurerm_linux_virtual_machine');

Tags