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). Valid values are 0 to 86400. Defaults to 0.
backend list The list of backend that serve this backend service.
connection-draining 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.
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. The name must be 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. (Required)
protocol The protocol this backend service uses to communicate. Valid values are HTTP, HTTPS, TCP, SSL, or UDP. Default to HTTPS
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.
timeout-sec The backend service timeout. Defaults to 30 seconds.
cdn-policy CDN configuration for this backend service.
region The region for the backend service.

Outputs

Attribute Description
self-link Server-defined URL for the resource.