Skip to content

Commit d420730

Browse files
authored
feat: make secondary_ip_range_names field optional (#8)
1 parent 7ca0e20 commit d420730

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nat.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ resource "google_compute_router_nat" "nats" {
4444
content {
4545
name = subnetwork.value.name
4646
source_ip_ranges_to_nat = subnetwork.value.source_ip_ranges_to_nat
47-
secondary_ip_range_names = subnetwork.value.secondary_ip_range_names
47+
secondary_ip_range_names = lookup(subnetwork.value, "secondary_ip_range_names", [])
4848
}
4949
}
5050
}

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ variable "bgp" {
6565
# - subnetworks (list(objects), optional):
6666
# - name (string, required): Self-link of subnetwork to NAT.
6767
# - source_ip_ranges_to_nat (string, required): List of options for which source IPs in the subnetwork should have NAT enabled.
68-
# - secondary_ip_range_names (string, required): List of the secondary ranges of the subnetwork that are allowed to use NAT.
68+
# - secondary_ip_range_names (string, optional): List of the secondary ranges of the subnetwork that are allowed to use NAT.
6969
variable "nats" {
7070
description = "NATs to deploy on this router."
7171
type = any

0 commit comments

Comments
 (0)