Merge pull request #11228 from cblecker/rbs-sessionaffinity

provider/google: Add support for session_affinity to google_compute_region_backend_service
This commit is contained in:
Dana Hoffman 2017-01-18 10:06:02 -08:00 committed by GitHub
commit ce902c7c8e
2 changed files with 8 additions and 3 deletions

View File

@ -89,9 +89,9 @@ The following arguments are supported:
* `region` - (Optional) The Region in which the created address should reside. * `region` - (Optional) The Region in which the created address should reside.
If it is not provided, the provider region is used. If it is not provided, the provider region is used.
* `session_affinity` - (Optional) How to distribute load. Options are "NONE" (no * `session_affinity` - (Optional) How to distribute load. Options are `NONE` (no
affinity), "CLIENT\_IP" (hash of the source/dest addresses / ports), and affinity), `CLIENT_IP` (hash of the source/dest addresses / ports), and
"GENERATED\_COOKIE" (distribute load using a generated session cookie). `GENERATED_COOKIE` (distribute load using a generated session cookie).
* `timeout_sec` - (Optional) The number of secs to wait for a backend to respond * `timeout_sec` - (Optional) The number of secs to wait for a backend to respond
to a request before considering the request failed. Defaults to `30`. to a request before considering the request failed. Defaults to `30`.

View File

@ -20,6 +20,7 @@ resource "google_compute_region_backend_service" "foobar" {
description = "Hello World 1234" description = "Hello World 1234"
protocol = "TCP" protocol = "TCP"
timeout_sec = 10 timeout_sec = 10
session_affinity = "CLIENT_IP"
backend { backend {
group = "${google_compute_instance_group_manager.foo.instance_group}" group = "${google_compute_instance_group_manager.foo.instance_group}"
@ -84,6 +85,10 @@ The following arguments are supported:
* `protocol` - (Optional) The protocol for incoming requests. Defaults to * `protocol` - (Optional) The protocol for incoming requests. Defaults to
`HTTP`. `HTTP`.
* `session_affinity` - (Optional) How to distribute load. Options are `NONE` (no
affinity), `CLIENT_IP`, `CLIENT_IP_PROTO`, or `CLIENT_IP_PORT_PROTO`.
Defaults to `NONE`.
* `region` - (Optional) The Region in which the created address should reside. * `region` - (Optional) The Region in which the created address should reside.
If it is not provided, the provider region is used. If it is not provided, the provider region is used.