turbot/terraform_gcp_compliance

Query: dns_managed_zone_dnssec_enabled

Usage

powerpipe query terraform_gcp_compliance.query.dns_managed_zone_dnssec_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std ->> 'visibility') = 'private' then 'skip'
when coalesce((attributes_std ->> 'visibility'), '') in ('', 'public') and
((attributes_std -> 'dnssec_config') is null or coalesce((attributes_std -> 'dnssec_config' ->> 'state'), '') in ('', 'off'))
then 'alarm'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'dnssec_config') is null then ' ''dnssec_config'' is not defined'
when coalesce((attributes_std -> 'dnssec_config' ->> 'state'), '') = '' then ' ''dnssec_config.state'' is not defined'
when (attributes_std ->> 'visibility') = 'private'
then ' is private.'
when coalesce((attributes_std ->> 'visibility'), '') in ('', 'public') and
((attributes_std -> 'dnssec_config') is null or (attributes_std -> 'dnssec_config' ->> 'state') = 'off')
then ' DNSSEC not enabled'
else ' DNSSEC enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'google_dns_managed_zone';