From 6d3251b08d8fe246e3fb0cf108348024b228fe06 Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Tue, 25 Apr 2017 13:03:36 -0700 Subject: [PATCH] provider/google: documentation and validation fixes for forwarding rules --- .../providers/google/resource_compute_forwarding_rule.go | 1 + .../google/r/compute_forwarding_rule.html.markdown | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/providers/google/resource_compute_forwarding_rule.go b/builtin/providers/google/resource_compute_forwarding_rule.go index b4bd4a7792cb..e89e0cdcedad 100644 --- a/builtin/providers/google/resource_compute_forwarding_rule.go +++ b/builtin/providers/google/resource_compute_forwarding_rule.go @@ -89,6 +89,7 @@ func resourceComputeForwardingRule() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, Set: schema.HashString, + MaxItems: 5, }, "project": &schema.Schema{ diff --git a/website/source/docs/providers/google/r/compute_forwarding_rule.html.markdown b/website/source/docs/providers/google/r/compute_forwarding_rule.html.markdown index 845a7450b69c..a8c735187372 100644 --- a/website/source/docs/providers/google/r/compute_forwarding_rule.html.markdown +++ b/website/source/docs/providers/google/r/compute_forwarding_rule.html.markdown @@ -3,7 +3,7 @@ layout: "google" page_title: "Google: google_compute_forwarding_rule" sidebar_current: "docs-google-compute-forwarding-rule" description: |- - Manages a Target Pool within GCE. + Manages a Forwarding Rule within GCE. --- # google\_compute\_forwarding\_rule @@ -54,8 +54,9 @@ The following arguments are supported: * `port_range` - (Optional) A range e.g. "1024-2048" or a single port "1024" (defaults to all ports!). Only used for external load balancing. -* `ports` - (Optional) A list of ports to use for internal load balancing - (defaults to all ports). +* `ports` - (Optional) A list of ports (maximum of 5) to use for internal load + balancing. Packets addressed to these ports will be forwarded to the backends + configured with this forwarding rule. Required for internal load balancing. * `project` - (Optional) The project in which the resource belongs. If it is not provided, the provider project is used.