turbot/azure_insights

Query: sql_database_geo_redundant_backup_enabled

Usage

powerpipe query azure_insights.query.sql_database_geo_redundant_backup_enabled

Steampipe Tables

SQL

select
'Geo-Redundant Backup' as label,
case
when (
retention_policy_property ->> 'monthlyRetention' <> 'PT0S'
or retention_policy_property ->> 'weeklyRetention' <> 'PT0S'
or retention_policy_property ->> 'yearlyRetention' <> 'PT0S'
) then 'Enabled'
else 'Disabled'
end as value,
case
when (
retention_policy_property ->> 'monthlyRetention' <> 'PT0S'
or retention_policy_property ->> 'weeklyRetention' <> 'PT0S'
or retention_policy_property ->> 'yearlyRetention' <> 'PT0S'
) then 'ok'
else 'alert'
end as type
from
azure_sql_database
where
lower(id) = $1;

Dashboards

The query is used in the dashboards: