Fix forwarding rule fields and add Internal LB example (#236)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-04-26 10:54:05 -07:00 committed by Alex Stephen
parent aa9c427de1
commit 39cf4ccae0
2 changed files with 44 additions and 59 deletions

View file

@ -91,9 +91,8 @@ options:
- ICMP - ICMP
backend_service: backend_service:
description: description:
- A reference to a BackendService to receive the matched traffic. - A BackendService to receive the matched traffic. This is used only for INTERNAL
- This is used for internal load balancing. load balancing.
- "(not used for external load balancing) ."
- 'This field represents a link to a BackendService resource in GCP. It can be - 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. First, you can place a dictionary with key ''selfLink'' specified in two ways. First, you can place a dictionary with key ''selfLink''
and value of your resource''s selfLink Alternatively, you can add `register: and value of your resource''s selfLink Alternatively, you can add `register:
@ -102,8 +101,7 @@ options:
required: false required: false
ip_version: ip_version:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are - ipVersion is not a valid field for regional forwarding rules.
IPV4 or IPV6. This can only be specified for a global forwarding rule.
required: false required: false
choices: choices:
- IPV4 - IPV4
@ -133,7 +131,7 @@ options:
- For internal load balancing, this field identifies the network that the load - For internal load balancing, this field identifies the network that the load
balanced IP should belong to for this Forwarding Rule. If this field is not balanced IP should belong to for this Forwarding Rule. If this field is not
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is only used for INTERNAL load balancing.
- 'This field represents a link to a Network resource in GCP. It can be specified - 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. First, you can place a dictionary with key ''selfLink'' and value in two ways. First, you can place a dictionary with key ''selfLink'' and value
of your resource''s selfLink Alternatively, you can add `register: name-of-resource` of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
@ -164,12 +162,10 @@ options:
required: false required: false
subnetwork: subnetwork:
description: description:
- A reference to a subnetwork. - The subnetwork that the load balanced IP should belong to for this Forwarding
- For internal load balancing, this field identifies the subnetwork that the load Rule. This field is only used for INTERNAL load balancing.
balanced IP should belong to for this Forwarding Rule.
- If the network specified is in auto subnet mode, this field is optional. However, - If the network specified is in auto subnet mode, this field is optional. However,
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified - 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. First, you can place a dictionary with key ''selfLink'' and value in two ways. First, you can place a dictionary with key ''selfLink'' and value
of your resource''s selfLink Alternatively, you can add `register: name-of-resource` of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
@ -178,12 +174,10 @@ options:
required: false required: false
target: target:
description: description:
- This field is only used for EXTERNAL load balancing.
- A reference to a TargetPool resource to receive the matched traffic. - A reference to a TargetPool resource to receive the matched traffic.
- For regional forwarding rules, this target must live in the same region as the - This target must live in the same region as the forwarding rule.
forwarding rule. For global forwarding rules, this target must be a global load - The forwarded traffic must be of a type appropriate to the target object.
balancing resource. The forwarded traffic must be of a type appropriate to the
target object.
- This field is not used for internal load balancing.
- 'This field represents a link to a TargetPool resource in GCP. It can be specified - 'This field represents a link to a TargetPool resource in GCP. It can be specified
in two ways. First, you can place a dictionary with key ''selfLink'' and value in two ways. First, you can place a dictionary with key ''selfLink'' and value
of your resource''s selfLink Alternatively, you can add `register: name-of-resource` of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
@ -193,9 +187,10 @@ options:
version_added: 2.7 version_added: 2.7
all_ports: all_ports:
description: description:
- When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` - For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL
and specify this field as `true` to allow packets addressed to any ports to and protocol is TCP/UDP), set this to true to allow packets addressed to any
be forwarded to the backends configured with this forwarding rule. ports to be forwarded to the backends configured with this forwarding rule.
Used with backend service. Cannot be set if port or portRange are set.
required: false required: false
type: bool type: bool
version_added: 2.8 version_added: 2.8
@ -218,7 +213,7 @@ options:
`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase
letter, and all following characters must be a dash, lowercase letter, or digit, letter, and all following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash. except the last character, which cannot be a dash.
- This field is only used for internal load balancing. - This field is only used for INTERNAL load balancing.
required: false required: false
version_added: 2.8 version_added: 2.8
region: region:
@ -316,15 +311,13 @@ IPProtocol:
type: str type: str
backendService: backendService:
description: description:
- A reference to a BackendService to receive the matched traffic. - A BackendService to receive the matched traffic. This is used only for INTERNAL
- This is used for internal load balancing. load balancing.
- "(not used for external load balancing) ."
returned: success returned: success
type: dict type: dict
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are IPV4 - ipVersion is not a valid field for regional forwarding rules.
or IPV6. This can only be specified for a global forwarding rule.
returned: success returned: success
type: str type: str
loadBalancingScheme: loadBalancingScheme:
@ -351,7 +344,7 @@ network:
- For internal load balancing, this field identifies the network that the load balanced - For internal load balancing, this field identifies the network that the load balanced
IP should belong to for this Forwarding Rule. If this field is not specified, IP should belong to for this Forwarding Rule. If this field is not specified,
the default network will be used. the default network will be used.
- This field is not used for external load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: dict type: dict
portRange: portRange:
@ -379,29 +372,26 @@ ports:
type: list type: list
subnetwork: subnetwork:
description: description:
- A reference to a subnetwork. - The subnetwork that the load balanced IP should belong to for this Forwarding
- For internal load balancing, this field identifies the subnetwork that the load Rule. This field is only used for INTERNAL load balancing.
balanced IP should belong to for this Forwarding Rule.
- If the network specified is in auto subnet mode, this field is optional. However, - If the network specified is in auto subnet mode, this field is optional. However,
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing.
returned: success returned: success
type: dict type: dict
target: target:
description: description:
- This field is only used for EXTERNAL load balancing.
- A reference to a TargetPool resource to receive the matched traffic. - A reference to a TargetPool resource to receive the matched traffic.
- For regional forwarding rules, this target must live in the same region as the - This target must live in the same region as the forwarding rule.
forwarding rule. For global forwarding rules, this target must be a global load - The forwarded traffic must be of a type appropriate to the target object.
balancing resource. The forwarded traffic must be of a type appropriate to the
target object.
- This field is not used for internal load balancing.
returned: success returned: success
type: dict type: dict
allPorts: allPorts:
description: description:
- When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` - For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and
and specify this field as `true` to allow packets addressed to any ports to be protocol is TCP/UDP), set this to true to allow packets addressed to any ports
forwarded to the backends configured with this forwarding rule. to be forwarded to the backends configured with this forwarding rule. Used with
backend service. Cannot be set if port or portRange are set.
returned: success returned: success
type: bool type: bool
networkTier: networkTier:
@ -420,13 +410,13 @@ serviceLabel:
`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase
letter, and all following characters must be a dash, lowercase letter, or digit, letter, and all following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash. except the last character, which cannot be a dash.
- This field is only used for internal load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: str type: str
serviceName: serviceName:
description: description:
- The internal fully qualified service name for this Forwarding Rule. - The internal fully qualified service name for this Forwarding Rule.
- This field is only used for internal load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: str type: str
region: region:

View file

@ -119,15 +119,13 @@ items:
type: str type: str
backendService: backendService:
description: description:
- A reference to a BackendService to receive the matched traffic. - A BackendService to receive the matched traffic. This is used only for INTERNAL
- This is used for internal load balancing. load balancing.
- "(not used for external load balancing) ."
returned: success returned: success
type: dict type: dict
ipVersion: ipVersion:
description: description:
- The IP Version that will be used by this forwarding rule. Valid options are - ipVersion is not a valid field for regional forwarding rules.
IPV4 or IPV6. This can only be specified for a global forwarding rule.
returned: success returned: success
type: str type: str
loadBalancingScheme: loadBalancingScheme:
@ -154,7 +152,7 @@ items:
- For internal load balancing, this field identifies the network that the load - For internal load balancing, this field identifies the network that the load
balanced IP should belong to for this Forwarding Rule. If this field is not balanced IP should belong to for this Forwarding Rule. If this field is not
specified, the default network will be used. specified, the default network will be used.
- This field is not used for external load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: dict type: dict
portRange: portRange:
@ -184,29 +182,26 @@ items:
type: list type: list
subnetwork: subnetwork:
description: description:
- A reference to a subnetwork. - The subnetwork that the load balanced IP should belong to for this Forwarding
- For internal load balancing, this field identifies the subnetwork that the Rule. This field is only used for INTERNAL load balancing.
load balanced IP should belong to for this Forwarding Rule.
- If the network specified is in auto subnet mode, this field is optional. However, - If the network specified is in auto subnet mode, this field is optional. However,
if the network is in custom subnet mode, a subnetwork must be specified. if the network is in custom subnet mode, a subnetwork must be specified.
- This field is not used for external load balancing.
returned: success returned: success
type: dict type: dict
target: target:
description: description:
- This field is only used for EXTERNAL load balancing.
- A reference to a TargetPool resource to receive the matched traffic. - A reference to a TargetPool resource to receive the matched traffic.
- For regional forwarding rules, this target must live in the same region as - This target must live in the same region as the forwarding rule.
the forwarding rule. For global forwarding rules, this target must be a global - The forwarded traffic must be of a type appropriate to the target object.
load balancing resource. The forwarded traffic must be of a type appropriate
to the target object.
- This field is not used for internal load balancing.
returned: success returned: success
type: dict type: dict
allPorts: allPorts:
description: description:
- When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` - For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL
and specify this field as `true` to allow packets addressed to any ports to and protocol is TCP/UDP), set this to true to allow packets addressed to any
be forwarded to the backends configured with this forwarding rule. ports to be forwarded to the backends configured with this forwarding rule.
Used with backend service. Cannot be set if port or portRange are set.
returned: success returned: success
type: bool type: bool
networkTier: networkTier:
@ -225,13 +220,13 @@ items:
expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must
be a lowercase letter, and all following characters must be a dash, lowercase be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash. letter, or digit, except the last character, which cannot be a dash.
- This field is only used for internal load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: str type: str
serviceName: serviceName:
description: description:
- The internal fully qualified service name for this Forwarding Rule. - The internal fully qualified service name for this Forwarding Rule.
- This field is only used for internal load balancing. - This field is only used for INTERNAL load balancing.
returned: success returned: success
type: str type: str
region: region: