Update BackendService docs to reflect being GLB only (#3503)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-04-30 14:36:44 -07:00 committed by Riley Karson
parent 6345dd2dc5
commit 5d1e03906d
2 changed files with 16 additions and 27 deletions

View File

@ -296,7 +296,8 @@ func resourceComputeBackendService() *schema.Resource {
"load_balancing_scheme": { "load_balancing_scheme": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
ValidateFunc: validation.StringInSlice([]string{"INTERNAL", "EXTERNAL", ""}, false), ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"EXTERNAL", ""}, false),
Default: "EXTERNAL", Default: "EXTERNAL",
}, },
"port_name": { "port_name": {
@ -319,7 +320,7 @@ func resourceComputeBackendService() *schema.Resource {
Type: schema.TypeString, Type: schema.TypeString,
Computed: true, Computed: true,
Optional: true, Optional: true,
ValidateFunc: validation.StringInSlice([]string{"NONE", "CLIENT_IP", "GENERATED_COOKIE", "CLIENT_IP_PROTO", "CLIENT_IP_PORT_PROTO", ""}, false), ValidateFunc: validation.StringInSlice([]string{"NONE", "CLIENT_IP", "GENERATED_COOKIE", ""}, false),
}, },
"timeout_sec": { "timeout_sec": {
Type: schema.TypeInt, Type: schema.TypeInt,

View File

@ -16,16 +16,23 @@ layout: "google"
page_title: "Google: google_compute_backend_service" page_title: "Google: google_compute_backend_service"
sidebar_current: "docs-google-compute-backend-service" sidebar_current: "docs-google-compute-backend-service"
description: |- description: |-
Creates a BackendService resource in the specified project using the data A Backend Service defines a group of virtual machines that will serve
included in the request. traffic for load balancing.
--- ---
# google\_compute\_backend\_service # google\_compute\_backend\_service
Creates a BackendService resource in the specified project using the data A Backend Service defines a group of virtual machines that will serve
included in the request. traffic for load balancing. This resource is a global backend service,
appropriate for external load balancing. For internal load balancing, use
a regional backend service instead.
To get more information about BackendService, see:
* [API documentation](https://cloud.google.com/compute/docs/reference/v1/backendServices)
* How-to Guides
* [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/http/backend-service)
<div class = "oics-button" style="float: right; margin: 0 0 -15px"> <div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=backend_service_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=backend_service_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
@ -59,8 +66,6 @@ The following arguments are supported:
The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource
for health checking this BackendService. Currently at most one health for health checking this BackendService. Currently at most one health
check can be specified, and a health check is required. check can be specified, and a health check is required.
For internal load balancing, a URL to a HealthCheck resource must be
specified instead.
* `name` - * `name` -
(Required) (Required)
@ -104,7 +109,6 @@ The following arguments are supported:
* `enable_cdn` - * `enable_cdn` -
(Optional) (Optional)
If true, enable Cloud CDN for this BackendService. If true, enable Cloud CDN for this BackendService.
When the load balancing scheme is INTERNAL, this field is not used.
* `iap` - * `iap` -
(Optional) (Optional)
@ -114,22 +118,19 @@ The following arguments are supported:
(Optional) (Optional)
Indicates whether the backend service will be used with internal or Indicates whether the backend service will be used with internal or
external load balancing. A backend service created for one type of external load balancing. A backend service created for one type of
load balancing cannot be used with the other. One of `INTERNAL` or load balancing cannot be used with the other. Must be `EXTERNAL` for
`EXTERNAL`. Defaults to `EXTERNAL`. a global backend service. Defaults to `EXTERNAL`.
* `port_name` - * `port_name` -
(Optional) (Optional)
Name of backend port. The same name should appear in the instance Name of backend port. The same name should appear in the instance
groups referenced by this service. Required when the load balancing groups referenced by this service. Required when the load balancing
scheme is EXTERNAL. scheme is EXTERNAL.
When the load balancing scheme is INTERNAL, this field is not used.
* `protocol` - * `protocol` -
(Optional) (Optional)
The protocol this BackendService uses to communicate with backends. The protocol this BackendService uses to communicate with backends.
Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP. Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
For internal load balancing, the possible values are TCP and UDP, and
the default is TCP.
* `security_policy` - * `security_policy` -
(Optional) (Optional)
@ -140,8 +141,6 @@ The following arguments are supported:
Type of session affinity to use. The default is NONE. Type of session affinity to use. The default is NONE.
When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or
GENERATED_COOKIE. GENERATED_COOKIE.
When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP,
CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the protocol is UDP, this field is not used. When the protocol is UDP, this field is not used.
* `timeout_sec` - * `timeout_sec` -
@ -160,7 +159,6 @@ The `backend` block supports:
For global HTTP(S) or TCP/SSL load balancing, the default is For global HTTP(S) or TCP/SSL load balancing, the default is
UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S))
and CONNECTION (for TCP/SSL). and CONNECTION (for TCP/SSL).
This cannot be used for internal load balancing.
* `capacity_scaler` - * `capacity_scaler` -
(Optional) (Optional)
@ -170,7 +168,6 @@ The `backend` block supports:
of its configured capacity (depending on balancingMode). A of its configured capacity (depending on balancingMode). A
setting of 0 means the group is completely drained, offering setting of 0 means the group is completely drained, offering
0% of its available Capacity. Valid range is [0.0,1.0]. 0% of its available Capacity. Valid range is [0.0,1.0].
This cannot be used for internal load balancing.
* `description` - * `description` -
(Optional) (Optional)
@ -193,10 +190,6 @@ The `backend` block supports:
Note that you must specify an Instance Group or Network Endpoint Note that you must specify an Instance Group or Network Endpoint
Group resource using the fully-qualified URL, rather than a Group resource using the fully-qualified URL, rather than a
partial URL. partial URL.
When the BackendService has load balancing scheme INTERNAL, the
instance group must be within the same region as the
BackendService. Network Endpoint Groups are not supported for
INTERNAL load balancing scheme.
* `max_connections` - * `max_connections` -
(Optional) (Optional)
@ -204,7 +197,6 @@ The `backend` block supports:
be used with either CONNECTION or UTILIZATION balancing modes. be used with either CONNECTION or UTILIZATION balancing modes.
For CONNECTION mode, either maxConnections or For CONNECTION mode, either maxConnections or
maxConnectionsPerInstance must be set. maxConnectionsPerInstance must be set.
This cannot be used for internal load balancing.
* `max_connections_per_instance` - * `max_connections_per_instance` -
(Optional) (Optional)
@ -214,7 +206,6 @@ The `backend` block supports:
UTILIZATION balancing modes. UTILIZATION balancing modes.
For CONNECTION mode, either maxConnections or For CONNECTION mode, either maxConnections or
maxConnectionsPerInstance must be set. maxConnectionsPerInstance must be set.
This cannot be used for internal load balancing.
* `max_rate` - * `max_rate` -
(Optional) (Optional)
@ -222,7 +213,6 @@ The `backend` block supports:
Can be used with either RATE or UTILIZATION balancing modes, Can be used with either RATE or UTILIZATION balancing modes,
but required if RATE mode. For RATE mode, either maxRate or but required if RATE mode. For RATE mode, either maxRate or
maxRatePerInstance must be set. maxRatePerInstance must be set.
This cannot be used for internal load balancing.
* `max_rate_per_instance` - * `max_rate_per_instance` -
(Optional) (Optional)
@ -230,14 +220,12 @@ The `backend` block supports:
instance can handle. This is used to calculate the capacity of instance can handle. This is used to calculate the capacity of
the group. Can be used in either balancing mode. For RATE mode, the group. Can be used in either balancing mode. For RATE mode,
either maxRate or maxRatePerInstance must be set. either maxRate or maxRatePerInstance must be set.
This cannot be used for internal load balancing.
* `max_utilization` - * `max_utilization` -
(Optional) (Optional)
Used when balancingMode is UTILIZATION. This ratio defines the Used when balancingMode is UTILIZATION. This ratio defines the
CPU utilization target for the group. The default is 0.8. Valid CPU utilization target for the group. The default is 0.8. Valid
range is [0.0, 1.0]. range is [0.0, 1.0].
This cannot be used for internal load balancing.
The `cdn_policy` block supports: The `cdn_policy` block supports: