From a3caf90b4fb1b3c6f67ed6d2fd9d4ff0ab79fbf4 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 26 Dec 2018 18:00:46 -0800 Subject: [PATCH] Make google_compute_router_nat's source_ip_ranges_to_nat Required (#2749) /cc @rileykarson --- google/resource_compute_router_nat.go | 7 ++++++- website/docs/r/compute_router_nat.html.markdown | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/google/resource_compute_router_nat.go b/google/resource_compute_router_nat.go index b55eec12..ad1bb8ee 100644 --- a/google/resource_compute_router_nat.go +++ b/google/resource_compute_router_nat.go @@ -22,9 +22,14 @@ var ( Required: true, ForceNew: true, }, + + // this field is optional with a default in the API, but we + // don't have the ability to support complex defaults inside + // nested fields "source_ip_ranges_to_nat": { Type: schema.TypeSet, - Optional: true, + Required: true, + MinItems: 1, ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/website/docs/r/compute_router_nat.html.markdown b/website/docs/r/compute_router_nat.html.markdown index e82da215..d64a3bdb 100644 --- a/website/docs/r/compute_router_nat.html.markdown +++ b/website/docs/r/compute_router_nat.html.markdown @@ -149,7 +149,7 @@ The `subnetwork` block supports: * `name` - (Required) The `self_link` of the subnetwork to NAT. -* `source_ip_ranges_to_nat` - (Optional) List of options for which source IPs in the subnetwork +* `source_ip_ranges_to_nat` - (Required) List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include: `ALL_IP_RANGES`, `LIST_OF_SECONDARY_IP_RANGES`, `PRIMARY_IP_RANGE`