Control: Network DNS server should have at least two connected DNS Endpoint
Description
This check ensures that Network DNS server has at least two connected DNS Endpoints.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.network_virtual_network_dns_server_2
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.network_virtual_network_dns_server_2 --share
SQL
This control uses a named query:
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_linefrom terraform_resourcewhere type = 'azurerm_virtual_network_dns_servers';