Using Console
Using CLI
gcloud dns managed-zones list | awk '{print "gcloud dns managed-zones update "$1" --log-dns-queries";}' | grep -v "LOGGING" | bash
This command will list all the managed zones in the project, and then update each managed zone with the --log-dns-queries
flag to enable Cloud DNS logging.
gcloud dns managed-zones describe [MANAGED_ZONE_NAME]
Replace [MANAGED_ZONE_NAME]
with the name of the managed zone you want to verify. Look for the dnsQueriesLogMode
field in the output, which should be set to ALL
.
Using Python