turbot/terraform_azure_compliance

Query: sql_server_atp_enabled

Usage

powerpipe query terraform_azure_compliance.query.sql_server_atp_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'threat_detection_policy') is null then 'alarm'
when (attributes_std -> 'threat_detection_policy' ->> 'state') = 'Disabled' then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'threat_detection_policy') is null then ' does not have ATP enabled'
when (attributes_std -> 'threat_detection_policy' ->> 'state') = 'Disabled' then ' does not have ATP enabled'
else ' has ATP enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_sql_server';

Controls

The query is being used by the following controls: