yandex_alb_backend_group (Resource)
- Example usage
- Schema
- Optional
- Read-Only
- Nested Schema for grpc_backend
- Nested Schema for grpc_backend.healthcheck
- Nested Schema for grpc_backend.healthcheck.grpc_healthcheck
- Nested Schema for grpc_backend.healthcheck.http_healthcheck
- Nested Schema for grpc_backend.healthcheck.stream_healthcheck
- Nested Schema for grpc_backend.load_balancing_config
- Nested Schema for grpc_backend.tls
- Nested Schema for grpc_backend.tls.validation_context
- Nested Schema for http_backend
- Nested Schema for http_backend.healthcheck
- Nested Schema for http_backend.healthcheck.grpc_healthcheck
- Nested Schema for http_backend.healthcheck.http_healthcheck
- Nested Schema for http_backend.healthcheck.stream_healthcheck
- Nested Schema for http_backend.load_balancing_config
- Nested Schema for http_backend.tls
- Nested Schema for http_backend.tls.validation_context
- Nested Schema for session_affinity
- Nested Schema for session_affinity.connection
- Nested Schema for session_affinity.cookie
- Nested Schema for session_affinity.header
- Nested Schema for stream_backend
- Nested Schema for stream_backend.healthcheck
- Nested Schema for stream_backend.healthcheck.grpc_healthcheck
- Nested Schema for stream_backend.healthcheck.http_healthcheck
- Nested Schema for stream_backend.healthcheck.stream_healthcheck
- Nested Schema for stream_backend.load_balancing_config
- Nested Schema for stream_backend.tls
- Nested Schema for stream_backend.tls.validation_context
- Nested Schema for timeouts
- Import
Creates a backend group in the specified folder and adds the specified backends to it. For more information, see the official documentation.
Важно
Only one type of backends http_backend or grpc_backend or stream_backend should be specified.
Example usage
//
// Create a new ALB Backend Group.
//
resource "yandex_alb_backend_group" "my_alb_bg" {
name = "my-backend-group"
session_affinity {
connection {
source_ip = "127.0.0.1"
}
}
http_backend {
name = "test-http-backend"
weight = 1
port = 8080
target_group_ids = ["${yandex_alb_target_group.test-target-group.id}"]
tls {
sni = "backend-domain.internal"
}
load_balancing_config {
panic_threshold = 50
}
healthcheck {
timeout = "1s"
interval = "1s"
http_healthcheck {
path = "/"
}
}
http2 = "true"
}
}
Schema
Optional
description(String) The resource description.folder_id(String) The folder identifier that resource belongs to. If it is not provided, the default providerfolder-idis used.grpc_backend(Block List) gRPC backend specification that will be used by the ALB Backend Group. (see below for nested schema)http_backend(Block List) HTTP backend specification that will be used by the ALB Backend Group.
Важно
Only one of target_group_ids or storage_bucket should be specified. (see below for nested schema)
labels(Map of String) A set of key/value label pairs which assigned to resource.name(String) The resource name.session_affinity(Block List, Max: 1) Session affinity mode determines how incoming requests are grouped into one session.
Важно
Only one type(connection or cookie or header) of session affinity should be specified. (see below for nested schema)
stream_backend(Block List) Stream backend specification that will be used by the ALB Backend Group. (see below for nested schema)timeouts(Block, Optional) (see below for nested schema)
Read-Only
created_at(String) The creation timestamp of the resource.id(String) The ID of this resource.
Nested Schema for grpc_backend
Required:
name(String) Name of the backend.target_group_ids(List of String) References target groups for the backend.
Optional:
healthcheck(Block List, Max: 1) Healthcheck specification that will be used by this backend.
Важно
Only one of stream_healthcheck or http_healthcheck or grpc_healthcheck should be specified. (see below for nested schema)
load_balancing_config(Block List, Max: 1) Load Balancing Config specification that will be used by this backend. (see below for nested schema)port(Number) Port for incoming traffic.tls(Block List, Max: 1) TLS specification that will be used by this backend.
Важно
Only one of validation_context.0.trusted_ca_id or validation_context.0.trusted_ca_bytes should be specified. (see below for nested schema)
weight(Number) Weight of the backend. Traffic will be split between backends of the same BackendGroup according to their weights.
Nested Schema for grpc_backend.healthcheck
Required:
interval(String) Interval between health checks.timeout(String) Time to wait for a health check response.
Optional:
grpc_healthcheck(Block List, Max: 1) gRPC Healthcheck specification that will be used by this healthcheck. (see below for nested schema)healthcheck_port(Number) Optional alternative port for health checking.healthy_threshold(Number) Number of consecutive successful health checks required to promote endpoint into the healthy state. 0 means 1. Note that during startup, only a single successful health check is required to mark a host healthy.http_healthcheck(Block List, Max: 1) HTTP Healthcheck specification that will be used by this healthcheck. (see below for nested schema)interval_jitter_percent(Number) An optional jitter amount as a percentage of interval. If specified, during every interval value of (interval_ms * interval_jitter_percent / 100) will be added to the wait time.stream_healthcheck(Block List, Max: 1) Stream Healthcheck specification that will be used by this healthcheck. (see below for nested schema)unhealthy_threshold(Number) Number of consecutive failed health checks required to demote endpoint into the unhealthy state. 0 means 1. Note that for HTTP health checks, a single 503 immediately makes endpoint unhealthy.
Nested Schema for grpc_backend.healthcheck.grpc_healthcheck
Optional:
service_name(String) Service name forgrpc.health.v1.HealthCheckRequestmessage.
Nested Schema for grpc_backend.healthcheck.http_healthcheck
Required:
path(String) HTTP path.
Optional:
expected_statuses(List of Number) A list of HTTP response statuses considered healthy.host(String)HostHTTP header value.http2(Boolean) If set, health checks will use HTTP2.
Nested Schema for grpc_backend.healthcheck.stream_healthcheck
Optional:
receive(String) Data that must be contained in the messages received from targets for a successful health check. If not specified, no messages are expected from targets, and those that are received are not checked.send(String) Message sent to targets during TCP data transfer. If not specified, no data is sent to the target.
Nested Schema for grpc_backend.load_balancing_config
Optional:
locality_aware_routing_percent(Number) Percent of traffic to be sent to the same availability zone. The rest will be equally divided between other zones.mode(String) Load balancing mode for the backend. Possible values:ROUND_ROBIN,RANDOM,LEAST_REQUEST,MAGLEV_HASH.panic_threshold(Number) If percentage of healthy hosts in the backend is lower than panic_threshold, traffic will be routed to all backends no matter what the health status is. This helps to avoid healthy backends overloading when everything is bad. Zero means no panic threshold.strict_locality(Boolean) If set, will route requests only to the same availability zone. Balancer won't know about endpoints in other zones.
Nested Schema for grpc_backend.tls
Optional:
sni(String) SNI string for TLS connections.validation_context(Block List, Max: 1) (see below for nested schema)
Nested Schema for grpc_backend.tls.validation_context
Optional:
trusted_ca_bytes(String) PEM-encoded trusted CA certificate chain.trusted_ca_id(String) Trusted CA certificate ID in the Certificate Manager.
Nested Schema for http_backend
Required:
name(String) Name of the backend.
Optional:
healthcheck(Block List, Max: 1) Healthcheck specification that will be used by this backend.
Важно
Only one of stream_healthcheck or http_healthcheck or grpc_healthcheck should be specified. (see below for nested schema)
http2(Boolean) Enables HTTP2 for upstream requests. If not set, HTTP 1.1 will be used by default.load_balancing_config(Block List, Max: 1) Load Balancing Config specification that will be used by this backend. (see below for nested schema)port(Number) Port for incoming traffic.storage_bucket(String) Name of bucket which should be used as a backend.target_group_ids(List of String) References target groups for the backend.tls(Block List, Max: 1) TLS specification that will be used by this backend.
Важно
Only one of validation_context.0.trusted_ca_id or validation_context.0.trusted_ca_bytes should be specified. (see below for nested schema)
weight(Number) Weight of the backend. Traffic will be split between backends of the same BackendGroup according to their weights.
Nested Schema for http_backend.healthcheck
Required:
interval(String) Interval between health checks.timeout(String) Time to wait for a health check response.
Optional:
grpc_healthcheck(Block List, Max: 1) gRPC Healthcheck specification that will be used by this healthcheck. (see below for nested schema)healthcheck_port(Number) Optional alternative port for health checking.healthy_threshold(Number) Number of consecutive successful health checks required to promote endpoint into the healthy state. 0 means 1. Note that during startup, only a single successful health check is required to mark a host healthy.http_healthcheck(Block List, Max: 1) HTTP Healthcheck specification that will be used by this healthcheck. (see below for nested schema)interval_jitter_percent(Number) An optional jitter amount as a percentage of interval. If specified, during every interval value of (interval_ms * interval_jitter_percent / 100) will be added to the wait time.stream_healthcheck(Block List, Max: 1) Stream Healthcheck specification that will be used by this healthcheck. (see below for nested schema)unhealthy_threshold(Number) Number of consecutive failed health checks required to demote endpoint into the unhealthy state. 0 means 1. Note that for HTTP health checks, a single 503 immediately makes endpoint unhealthy.
Nested Schema for http_backend.healthcheck.grpc_healthcheck
Optional:
service_name(String) Service name forgrpc.health.v1.HealthCheckRequestmessage.
Nested Schema for http_backend.healthcheck.http_healthcheck
Required:
path(String) HTTP path.
Optional:
expected_statuses(List of Number) A list of HTTP response statuses considered healthy.host(String)HostHTTP header value.http2(Boolean) If set, health checks will use HTTP2.
Nested Schema for http_backend.healthcheck.stream_healthcheck
Optional:
receive(String) Data that must be contained in the messages received from targets for a successful health check. If not specified, no messages are expected from targets, and those that are received are not checked.send(String) Message sent to targets during TCP data transfer. If not specified, no data is sent to the target.
Nested Schema for http_backend.load_balancing_config
Optional:
locality_aware_routing_percent(Number) Percent of traffic to be sent to the same availability zone. The rest will be equally divided between other zones.mode(String) Load balancing mode for the backend. Possible values:ROUND_ROBIN,RANDOM,LEAST_REQUEST,MAGLEV_HASH.panic_threshold(Number) If percentage of healthy hosts in the backend is lower than panic_threshold, traffic will be routed to all backends no matter what the health status is. This helps to avoid healthy backends overloading when everything is bad. Zero means no panic threshold.strict_locality(Boolean) If set, will route requests only to the same availability zone. Balancer won't know about endpoints in other zones.
Nested Schema for http_backend.tls
Optional:
sni(String) SNI string for TLS connections.validation_context(Block List, Max: 1) (see below for nested schema)
Nested Schema for http_backend.tls.validation_context
Optional:
trusted_ca_bytes(String) PEM-encoded trusted CA certificate chain.trusted_ca_id(String) Trusted CA certificate ID in the Certificate Manager.
Nested Schema for session_affinity
Optional:
connection(Block List, Max: 1) Requests received from the same IP are combined into a session. Stream backend groups only support session affinity by client IP address. (see below for nested schema)cookie(Block List, Max: 1) Requests with the same cookie value and the specified file name are combined into a session. Allowed only forHTTPandgRPCbackend groups. (see below for nested schema)header(Block List, Max: 1) Requests with the same value of the specified HTTP header, such as with user authentication data, are combined into a session. Allowed only forHTTPandgRPCbackend groups. (see below for nested schema)
Nested Schema for session_affinity.connection
Optional:
source_ip(Boolean) Source IP address to use with affinity.
Nested Schema for session_affinity.cookie
Required:
name(String) Name of the HTTP cookie to use with affinity.
Optional:
ttl(String) TTL for the cookie (if not set, session cookie will be used).
Nested Schema for session_affinity.header
Required:
header_name(String) The name of the request header that will be used with affinity.
Nested Schema for stream_backend
Required:
name(String) Name of the backend.target_group_ids(List of String) References target groups for the backend.
Optional:
enable_proxy_protocol(Boolean)healthcheck(Block List, Max: 1) Healthcheck specification that will be used by this backend.
Важно
Only one of stream_healthcheck or http_healthcheck or grpc_healthcheck should be specified. (see below for nested schema)
keep_connections_on_host_health_failure(Boolean) If set, when a backend host becomes unhealthy (as determined by the configured health checks), keep connections to the failed host.load_balancing_config(Block List, Max: 1) Load Balancing Config specification that will be used by this backend. (see below for nested schema)port(Number) Port for incoming traffic.tls(Block List, Max: 1) TLS specification that will be used by this backend.
Важно
Only one of validation_context.0.trusted_ca_id or validation_context.0.trusted_ca_bytes should be specified. (see below for nested schema)
weight(Number) Weight of the backend. Traffic will be split between backends of the same BackendGroup according to their weights.
Nested Schema for stream_backend.healthcheck
Required:
interval(String) Interval between health checks.timeout(String) Time to wait for a health check response.
Optional:
grpc_healthcheck(Block List, Max: 1) gRPC Healthcheck specification that will be used by this healthcheck. (see below for nested schema)healthcheck_port(Number) Optional alternative port for health checking.healthy_threshold(Number) Number of consecutive successful health checks required to promote endpoint into the healthy state. 0 means 1. Note that during startup, only a single successful health check is required to mark a host healthy.http_healthcheck(Block List, Max: 1) HTTP Healthcheck specification that will be used by this healthcheck. (see below for nested schema)interval_jitter_percent(Number) An optional jitter amount as a percentage of interval. If specified, during every interval value of (interval_ms * interval_jitter_percent / 100) will be added to the wait time.stream_healthcheck(Block List, Max: 1) Stream Healthcheck specification that will be used by this healthcheck. (see below for nested schema)unhealthy_threshold(Number) Number of consecutive failed health checks required to demote endpoint into the unhealthy state. 0 means 1. Note that for HTTP health checks, a single 503 immediately makes endpoint unhealthy.
Nested Schema for stream_backend.healthcheck.grpc_healthcheck
Optional:
service_name(String) Service name forgrpc.health.v1.HealthCheckRequestmessage.
Nested Schema for stream_backend.healthcheck.http_healthcheck
Required:
path(String) HTTP path.
Optional:
expected_statuses(List of Number) A list of HTTP response statuses considered healthy.host(String)HostHTTP header value.http2(Boolean) If set, health checks will use HTTP2.
Nested Schema for stream_backend.healthcheck.stream_healthcheck
Optional:
receive(String) Data that must be contained in the messages received from targets for a successful health check. If not specified, no messages are expected from targets, and those that are received are not checked.send(String) Message sent to targets during TCP data transfer. If not specified, no data is sent to the target.
Nested Schema for stream_backend.load_balancing_config
Optional:
locality_aware_routing_percent(Number) Percent of traffic to be sent to the same availability zone. The rest will be equally divided between other zones.mode(String) Load balancing mode for the backend. Possible values:ROUND_ROBIN,RANDOM,LEAST_REQUEST,MAGLEV_HASH.panic_threshold(Number) If percentage of healthy hosts in the backend is lower than panic_threshold, traffic will be routed to all backends no matter what the health status is. This helps to avoid healthy backends overloading when everything is bad. Zero means no panic threshold.strict_locality(Boolean) If set, will route requests only to the same availability zone. Balancer won't know about endpoints in other zones.
Nested Schema for stream_backend.tls
Optional:
sni(String) SNI string for TLS connections.validation_context(Block List, Max: 1) (see below for nested schema)
Nested Schema for stream_backend.tls.validation_context
Optional:
trusted_ca_bytes(String) PEM-encoded trusted CA certificate chain.trusted_ca_id(String) Trusted CA certificate ID in the Certificate Manager.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
The resource can be imported by using their resource ID. For getting the resource ID you can use Yandex Cloud Web Console
# terraform import yandex_alb_backend_group.<resource Name> <resource ID>
terraform import yandex_alb_backend_group.my_alb_bg ds7io**********9bike