1+ /* *
2+ * Copyright 2020 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
117resource "google_compute_router_nat" "nats" {
218 for_each = {
319 for n in var . nats :
@@ -13,10 +29,10 @@ resource "google_compute_router_nat" "nats" {
1329
1430 nat_ips = lookup (each. value , " nat_ips" , [])
1531 min_ports_per_vm = lookup (each. value , " min_ports_per_vm" , 0 )
16- udp_idle_timeout_sec = lookup (each. value , " udp_idle_timeout_sec" , null )
17- icmp_idle_timeout_sec = lookup (each. value , " icmp_idle_timeout_sec" , null )
18- tcp_established_idle_timeout_sec = lookup (each. value , " tcp_established_idle_timeout_sec" , null )
19- tcp_transitory_idle_timeout_sec = lookup (each. value , " tcp_transitory_idle_timeout_sec" , null )
32+ udp_idle_timeout_sec = lookup (each. value , " udp_idle_timeout_sec" , 30 )
33+ icmp_idle_timeout_sec = lookup (each. value , " icmp_idle_timeout_sec" , 30 )
34+ tcp_established_idle_timeout_sec = lookup (each. value , " tcp_established_idle_timeout_sec" , 1200 )
35+ tcp_transitory_idle_timeout_sec = lookup (each. value , " tcp_transitory_idle_timeout_sec" , 30 )
2036
2137 dynamic "subnetwork" {
2238 for_each = lookup (each. value , " subnetworks" , [])
0 commit comments