turbot/steampipe-mod-azure-compliance

Query: storage_account_file_share_soft_delete_enabled

Usage

powerpipe query azure_compliance.query.storage_account_file_share_soft_delete_enabled

SQL

select
sa.id as resource,
case
when file_soft_delete_enabled and file_soft_delete_retention_days between 1 and 365 then 'ok'
else 'alarm'
end as status,
case
when not file_soft_delete_enabled then name || ' file share soft delete disabled.'
when file_soft_delete_retention_days < 1 or file_soft_delete_retention_days > 365
then name || ' file share soft delete retention days (' || file_soft_delete_retention_days || ') not between 1 and 365.'
else name || ' file share soft delete enabled with ' || file_soft_delete_retention_days || ' days retention.'
end as reason
, sa.resource_group as resource_group
, sub.display_name as subscription
from
azure_storage_account sa,
azure_subscription sub
where
sub.subscription_id = sa.subscription_id;

Controls

The query is being used by the following controls: