turbot/terraform_azure_compliance

Query: compute_vm_utilizing_managed_disk

Usage

powerpipe query terraform_azure_compliance.query.compute_vm_utilizing_managed_disk

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'storage_os_disk' ->> 'managed_disk_type') is not null or
(attributes_std -> 'storage_os_disk' ->> 'managed_disk_id') is not null then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'storage_os_disk' ->> 'managed_disk_type') is not null or
(attributes_std -> 'storage_os_disk' ->> 'managed_disk_id') is not null then ' utilizing managed disks'
else ' not utilizing managed disks'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_virtual_machine';