google::compute-region-backend-service¶
Creates a regional backend service.
Example¶
google::compute-region-backend-service regional-backend-service-example
name: 'regional-backend-service-example'
region: "us-central1"
description: 'regional-backend-service-example-desc'
backend
group
instance-group: $(google::compute-instance-group instance-group-example-regional-backend-service)
end
balancing-mode: "UTILIZATION"
end
health-check: [ $(google::compute-health-check health-check-example-regional-backend-service) ]
connection-draining
draining-timeout-sec: 41
end
load-balancing-scheme: "INTERNAL"
protocol: "HTTPS"
session-affinity: "NONE"
end
Attributes¶
| Attribute | Description |
|---|---|
| affinity-cookie-ttl-sec | If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). Defaults to 0. Valid values are between 0 to 86400. |
| backend list | The list of backend that serve this backend service. (Required) |
| connection-draining subresource | Connection draining configuration for the backend service.
|
| custom-request-headers map | Headers that the HTTP/S load balancer should add to proxied requests. Can only be set when protocol is set as HTTP or HTTPS. |
| description | An optional description of this resource. Provide this property when you create the resource. |
| enable-cdn | If true, enables Cloud CDN for the backend service. |
| health-check list | A list of health check for the backend service. Currently only one health check is supported. (Required) |
| load-balancing-scheme | Indicates whether the backend service will be used with internal or external load balancing.Valid values are INTERNAL, INTERNAL_MANAGED`, ``INTERNAL_SELF_MANAGED or EXTERNAL. Defaults to EXTERNAL. See Balance Modes Valid values are INTERNAL, INTERNAL_MANAGED, INTERNAL_SELF_MANAGED or EXTERNAL. |
| locality-lb-policy | The load balancing algorithm used within the scope of the locality. Valid values are ROUND_ROBIN, LEAST_REQUEST, RING_HASH, RANDOM, ORIGINAL_DESTINATION or MAGLEV. |
| name | The name of the backend service. Must be a string 1-63 characters long and the first character must 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. Valid values satisfy the regex: [(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))]. (Required) |
| protocol | The protocol this backend service uses to communicate. Default to HTTPS Valid values are HTTP, HTTPS, TCP, SSL or UDP. |
| session-affinity | Type of session affinity to use. When the load-balancing-scheme is EXTERNAL, valid values are NONE, CLIENT_IP or GENERATED_COOKIE,``GENERATED_COOKIE`` only if protocol is HTTP or HTTPS. load-balancing-scheme is INTERNAL, valid values are NONE, CLIENT_IP, CLIENT_IP_PROTO or CLIENT_IP_PORT_PROTO. When the load-balancing-scheme is INTERNAL_SELF_MANAGED, valid values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE. Defaults to NONE. Valid values are NONE, CLIENT_IP, GENERATED_COOKIE, CLIENT_IP_PROTO, CLIENT_IP_PORT_PROTO, HEADER_FIELD or HTTP_COOKIE. |
| timeout-sec | The backend service timeout. Defaults to 30 seconds. |
| cdn-policy subresource | CDN configuration for this backend service.
|
| region | The region for the backend service. (Required) |
Outputs¶
| Attribute | Description |
|---|---|
| self-link | Server-defined URL for the resource. |