Skip to content

Commit 270fe4f

Browse files
authored
feat: support max_ports_per_vm in NAT config (#48)
1 parent 345ddb5 commit 270fe4f

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

nat.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ resource "google_compute_router_nat" "nats" {
2929

3030
nat_ips = lookup(each.value, "nat_ips", null)
3131
min_ports_per_vm = lookup(each.value, "min_ports_per_vm", null)
32+
max_ports_per_vm = lookup(each.value, "max_ports_per_vm", null)
3233
udp_idle_timeout_sec = lookup(each.value, "udp_idle_timeout_sec", null)
3334
icmp_idle_timeout_sec = lookup(each.value, "icmp_idle_timeout_sec", null)
3435
tcp_established_idle_timeout_sec = lookup(each.value, "tcp_established_idle_timeout_sec", null)

variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ variable "bgp" {
6363
# - source_subnetwork_ip_ranges_to_nat (string, optional): How NAT should be configured per Subnetwork. Defaults to ALL_SUBNETWORKS_ALL_IP_RANGES.
6464
# - nat_ips (list(number), optional): Self-links of NAT IPs.
6565
# - min_ports_per_vm (number, optional): Minimum number of ports allocated to a VM from this NAT.
66+
# - max_ports_per_vm (number, optional): Maximum number of ports allocated to a VM from this NAT. This field can only be set when enableDynamicPortAllocation is enabled.
6667
# - udp_idle_timeout_sec (number, optional): Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
6768
# - icmp_idle_timeout_sec (number, optional): Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
6869
# - tcp_established_idle_timeout_sec (number, optional): Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ terraform {
2020

2121
google = {
2222
source = "hashicorp/google"
23-
version = ">= 4.22, < 5.0"
23+
version = ">= 4.27, < 5.0"
2424
}
2525
}
2626

0 commit comments

Comments
 (0)