diff --git a/modules/dns/README.md b/modules/dns/README.md
index e6d46a54d6..b6ffb3ba9f 100644
--- a/modules/dns/README.md
+++ b/modules/dns/README.md
@@ -129,7 +129,7 @@ module "public-dns" {
| [client_networks](variables.tf#L21) | List of VPC self links that can see this zone. | list(string)
| | []
|
| [description](variables.tf#L28) | Domain description. | string
| | "Terraform managed."
|
| [dnssec_config](variables.tf#L34) | DNSSEC configuration for this zone. | object({…})
| | {…}
|
-| [enable_logging](variables.tf#L59) | Enable query logging for this zone. Only valid for public zones. | bool
| | false
|
+| [enable_logging](variables.tf#L59) | Enable query logging for this zone | bool
| | false
|
| [forwarders](variables.tf#L66) | Map of {IPV4_ADDRESS => FORWARDING_PATH} for 'forwarding' zone types. Path can be 'default', 'private', or null for provider default. | map(string)
| | {}
|
| [peer_network](variables.tf#L77) | Peering network self link, only valid for 'peering' zone types. | string
| | null
|
| [recordsets](variables.tf#L88) | Map of DNS recordsets in \"type name\" => {ttl, [records]} format. | map(object({…}))
| | {}
|
diff --git a/modules/dns/main.tf b/modules/dns/main.tf
index edf342ef66..8c3b56fde8 100644
--- a/modules/dns/main.tf
+++ b/modules/dns/main.tf
@@ -131,7 +131,9 @@ resource "google_dns_managed_zone" "non-public" {
}
}
}
-
+ cloud_logging_config {
+ enable_logging = var.enable_logging
+ }
}
data "google_dns_managed_zone" "public" {
@@ -171,7 +173,9 @@ resource "google_dns_managed_zone" "public" {
}
}
}
-
+ cloud_logging_config {
+ enable_logging = var.enable_logging
+ }
}
data "google_dns_keys" "dns_keys" {
diff --git a/modules/dns/variables.tf b/modules/dns/variables.tf
index df80976e32..5e62489aaf 100644
--- a/modules/dns/variables.tf
+++ b/modules/dns/variables.tf
@@ -57,7 +57,7 @@ variable "domain" {
}
variable "enable_logging" {
- description = "Enable query logging for this zone. Only valid for public zones."
+ description = "Enable query logging for this zone."
type = bool
default = false
nullable = false