turbot/terraform_azure_compliance

Query: compute_vm_and_scale_set_encryption_at_host_enabled

Usage

powerpipe query terraform_azure_compliance.query.compute_vm_and_scale_set_encryption_at_host_enabled

Steampipe Tables

SQL

(
select
address as resource,
case
when (attributes_std -> 'encryption_at_host_enabled') is null then 'alarm'
when (attributes_std -> 'encryption_at_host_enabled') :: boolean then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'encryption_at_host_enabled') is null then ' ''encryption_at_host_enabled'' is not defined'
when (attributes_std -> 'encryption_at_host_enabled') :: boolean then ' encryption at host enabled'
else ' encryption at host disabled'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_linux_virtual_machine_scale_set'
or type = 'azurerm_windows_virtual_machine_scale_set'
)
union
(
select
address as resource,
case
when (attributes_std -> 'encryption_at_host_enabled') is null then 'alarm'
when (attributes_std -> 'encryption_at_host_enabled') :: boolean then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'encryption_at_host_enabled') is null then ' ''encryption_at_host_enabled'' is not defined'
when (attributes_std -> 'encryption_at_host_enabled') :: boolean then ' encryption at host enabled'
else ' encryption at host disabled'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_windows_virtual_machine'
or type = 'azurerm_linux_virtual_machine'
)

Controls

The query is being used by the following controls: