Skip to content

Commit 4255727

Browse files
committed
enable logging by deafult
1 parent 52c29b8 commit 4255727

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

nat.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ resource "google_compute_router_nat" "nats" {
3434
tcp_established_idle_timeout_sec = lookup(each.value, "tcp_established_idle_timeout_sec", 1200)
3535
tcp_transitory_idle_timeout_sec = lookup(each.value, "tcp_transitory_idle_timeout_sec", 30)
3636

37+
log_config {
38+
enable = true
39+
filter = lookup(lookup(each.value, "log_config", {}), "filter", "ALL")
40+
}
41+
3742
dynamic "subnetwork" {
3843
for_each = lookup(each.value, "subnetworks", [])
3944
content {

variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ variable "bgp" {
6060
# - icmp_idle_timeout_sec (number, optional): Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
6161
# - tcp_established_idle_timeout_sec (number, optional): Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
6262
# - tcp_transitory_idle_timeout_sec (number, optional): Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
63+
# - log_config (object, optional):
64+
# - filter: Specifies the desired filtering of logs on this NAT. Defaults to "ALL".
6365
# - subnetworks (list(objects), optional):
6466
# - name (string, required): Self-link of subnetwork to NAT.
6567
# - source_ip_ranges_to_nat (string, required): List of options for which source IPs in the subnetwork should have NAT enabled.

0 commit comments

Comments
 (0)