turbot/terraform_azure_compliance

Query: network_dns_server_2

Usage

powerpipe query terraform_azure_compliance.query.network_dns_server_2

Steampipe Tables

SQL

select
address as resource,
case
when attributes_std -> 'dns_servers' is null then 'alarm'
when jsonb_array_length(attributes_std -> 'dns_servers') > 1 then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when attributes_std -> 'dns_servers' is null then ' DNS servers not defined'
else ' has ' || (jsonb_array_length(attributes_std -> 'dns_servers')) || ' DNS server(s) configured'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_virtual_network';

Controls

The query is being used by the following controls: