Skip to content

Commit ca20095

Browse files
committed
fix nat defaults, add license to all tf files
1 parent 544ed90 commit ca20095

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

modules/interconnect_attachment/main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
resource "google_compute_interconnect_attachment" "attachment" {
218
name = var.name
319
router = var.router

modules/interface/main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
resource "google_compute_router_interface" "interface" {
218
name = var.name
319
project = var.project

nat.tf

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
resource "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

Comments
 (0)