Skip to content

Commit

Permalink
chore: enable dynamic port allocation on workflows NAT
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide committed Nov 22, 2023
1 parent 4727dbd commit e968606
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .aspect/workflows/terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .aspect/workflows/terraform/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@ resource "google_compute_router_nat" "nat" {
router = google_compute_router.router.name
nat_ip_allocate_option = "AUTO_ONLY"
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"

# Allow the ports assigned to each VM scale up and down as needed
# https://cloud.google.com/nat/docs/ports-and-addresses#dynamic-port
enable_dynamic_port_allocation = true
# Must be disabled when dynamic port allocation is enabled (default is true)
enable_endpoint_independent_mapping = false
# The min number of ports can be tuned by monitoring port usage:
# https://cloud.google.com/nat/docs/tune-nat-configuration#choose-minimum
min_ports_per_vm = 32
}

0 comments on commit e968606

Please sign in to comment.