Allow Cloud NAT to only use secondary ranges (#2384)

* Allow Cloud NAT to only use secondary ranges

* Fix secondary_ranges validation

* Fix linter
This commit is contained in:
Julio Castillo
2024-06-27 10:05:45 +02:00
committed by GitHub
parent 73d43b00db
commit 07e519a8b7
3 changed files with 45 additions and 16 deletions

View File

@@ -100,7 +100,12 @@ resource "google_compute_router_nat" "nat" {
subnetwork.value.all_ranges == true
? ["ALL_IP_RANGES"]
: concat(
["PRIMARY_IP_RANGE"],
(
subnetwork.value.primary_range
? ["PRIMARY_IP_RANGE"]
: []
)
,
(
subnetwork.value.secondary_ranges == null
? []