Yandex Cloud
Поиск
Связаться с намиПопробовать бесплатно
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Истории успеха
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Terraform в Yandex Cloud
  • Начало работы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • alb_backend_group
          • alb_http_router
          • alb_load_balancer
          • alb_target_group
          • alb_virtual_host

В этой статье:

  • Example usage
  • Arguments & Attributes Reference
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Application Load Balancer
  4. Data Sources
  5. alb_virtual_host

yandex_alb_virtual_host (DataSource)

Статья создана
Yandex Cloud
Обновлена 12 февраля 2026 г.
  • Example usage
  • Arguments & Attributes Reference

Get information about a Yandex ALB Virtual Host. For more information, see Yandex Cloud Application Load Balancer.

This data source is used to define Application Load Balancer Virtual Host that can be used by other resources.

Важно

One of virtual_host_id or name with http_router_id should be specified.

Example usageExample usage

//
// Get information about existing ALB Virtual Host
//
data "yandex_alb_virtual_host" "my-vhost" {
  name           = yandex_alb_virtual_host.my-vh.name
  http_router_id = yandex_alb_virtual_host.my-router.id
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • authority (Set Of String). A list of domains (host/authority header) that will be matched to this virtual host. Wildcard hosts are supported in the form of '.foo.com' or '-bar.foo.com'. If not specified, all domains will be matched.
  • http_router_id (Required)(String). The ID of the HTTP router to which the virtual host belongs.
  • id (String).
  • modify_request_headers [Block]. Apply the following modifications to the Request/Response header.

Важно

Only one type of actions append or replace or remove should be specified.

  • append (String). Append string to the header value.
  • name (Required)(String). Name of the header to modify.
  • remove (Bool). If set, remove the header.
  • replace (String). New value for a header. Header values support the following formatters.
  • modify_response_headers [Block]. Apply the following modifications to the Request/Response header.

Важно

Only one type of actions append or replace or remove should be specified.

  • append (String). Append string to the header value.
  • name (Required)(String). Name of the header to modify.
  • remove (Bool). If set, remove the header.
  • replace (String). New value for a header. Header values support the following formatters.
  • name (Required)(String). The resource name.
  • rate_limit [Block]. Rate limit configuration applied for a whole virtual host
    • all_requests [Block]. Rate limit configuration applied to all incoming requests
      • per_minute (Number). Limit value specified with per minute time unit
      • per_second (Number). Limit value specified with per second time unit
    • requests_per_ip [Block]. Rate limit configuration applied separately for each set of requests grouped by client IP address
      • per_minute (Number). Limit value specified with per minute time unit
      • per_second (Number). Limit value specified with per second time unit
  • route [Block]. A Route resource. Routes are matched in-order. Be careful when adding them to the end. For instance, having http '/' match first makes all other routes unused.

Важно

Exactly one type of routes http_route or grpc_route should be specified.

  • disable_security_profile (Bool). Disables security profile for the route
  • grpc_route [Block]. gRPC route resource.

Важно

Exactly one type of actions grpc_route_action or grpc_status_response_action should be specified.

- `grpc_match` [Block]. Checks `/` prefix by default.
  - `fqmn` [Block]. The `path` and `fqmn` blocks.

Важно

Exactly one type of string matches exact, prefix or regex should be specified.

    - `exact` (String). Match exactly.
    - `prefix` (String). Match prefix.
    - `regex` (String). Match regex.
- `grpc_route_action` [Block]. gRPC route action resource.

Важно

Only one type of host rewrite specifiers host_rewrite or auto_host_rewrite should be specified.

  - `auto_host_rewrite` (Bool). If set, will automatically rewrite host.
  - `backend_group_id` (**Required**)(String). Backend group to route requests.
  - `host_rewrite` (String). Host rewrite specifier.
  - `idle_timeout` (String). Specifies the idle timeout (time without any data transfer for the active request) for the route. It is useful for streaming scenarios - one should set idle_timeout to something meaningful and max_timeout to the maximum time the stream is allowed to be alive. If not specified, there is no per-route idle timeout.
  - `max_timeout` (String). Lower timeout may be specified by the client (using grpc-timeout header). If not set, default is 60 seconds.
  - `rate_limit` [Block]. Rate limit configuration applied for a whole virtual host
    - `all_requests` [Block]. Rate limit configuration applied to all incoming requests
      - `per_minute` (Number). Limit value specified with per minute time unit
      - `per_second` (Number). Limit value specified with per second time unit
    - `requests_per_ip` [Block]. Rate limit configuration applied separately for each set of requests grouped by client IP address
      - `per_minute` (Number). Limit value specified with per minute time unit
      - `per_second` (Number). Limit value specified with per second time unit
- `grpc_status_response_action` [Block]. gRPC status response action resource.
  - `status` (String). The status of the response. Supported values are: ok, invalid_argumet, not_found, permission_denied, unauthenticated, unimplemented, internal, unavailable.
  • http_route [Block]. HTTP route resource.

Важно

Exactly one type of actions http_route_action or redirect_action or direct_response_action should be specified.

- `direct_response_action` [Block]. Direct response action resource.
  - `body` (String). Response body text.
  - `status` (Number). HTTP response status. Should be between `100` and `599`.
- `http_match` [Block]. Checks `/` prefix by default.
  - `http_method` (Set Of String). List of methods (strings).
  - `path` [Block]. The `path` and `fqmn` blocks.

Важно

Exactly one type of string matches exact, prefix or regex should be specified.

    - `exact` (String). Match exactly.
    - `prefix` (String). Match prefix.
    - `regex` (String). Match regex.
- `http_route_action` [Block]. HTTP route action resource.

Важно

Only one type of host rewrite specifiers host_rewrite or auto_host_rewrite should be specified.

  - `auto_host_rewrite` (Bool). If set, will automatically rewrite host.
  - `backend_group_id` (**Required**)(String). Backend group to route requests.
  - `host_rewrite` (String). Host rewrite specifier.
  - `idle_timeout` (String). Specifies the idle timeout (time without any data transfer for the active request) for the route. It is useful for streaming scenarios (i.e. long-polling, server-sent events) - one should set idle_timeout to something meaningful and timeout to the maximum time the stream is allowed to be alive. If not specified, there is no per-route idle timeout.
  - `prefix_rewrite` (String). If not empty, matched path prefix will be replaced by this value.
  - `rate_limit` [Block]. Rate limit configuration applied for a whole virtual host
    - `all_requests` [Block]. Rate limit configuration applied to all incoming requests
      - `per_minute` (Number). Limit value specified with per minute time unit
      - `per_second` (Number). Limit value specified with per second time unit
    - `requests_per_ip` [Block]. Rate limit configuration applied separately for each set of requests grouped by client IP address
      - `per_minute` (Number). Limit value specified with per minute time unit
      - `per_second` (Number). Limit value specified with per second time unit
  - `regex_rewrite` [Block]. Replacement for path substrings that match the pattern
    - `regex` (String). RE2 regular expression
    - `substitute` (String). The string which should be used to substitute matched substrings
  - `timeout` (String). Specifies the request timeout (overall time request processing is allowed to take) for the route. If not set, default is 60 seconds.
  - `upgrade_types` (Set Of String). List of upgrade types. Only specified upgrade types will be allowed. For example, `websocket`.
- `redirect_action` [Block]. Redirect action resource.

Важно

Only one type of paths replace_path or replace_prefix should be specified.

  - `remove_query` (Bool). If set, remove query part.
  - `replace_host` (String). Replaces hostname.
  - `replace_path` (String). Replace path.
  - `replace_port` (Number). Replaces port.
  - `replace_prefix` (String). Replace only matched prefix. Example:<br/> match:{ prefix_match: `/some` } <br/> redirect: { replace_prefix: `/other` } <br/> will redirect `/something` to `/otherthing`.
  - `replace_scheme` (String). Replaces scheme. If the original scheme is `http` or `https`, will also remove the 80 or 443 port, if present.
  - `response_code` (String). The HTTP status code to use in the redirect response. Supported values are: `moved_permanently`, `found`, `see_other`, `temporary_redirect`, `permanent_redirect`.
  • name (String). Name of the route.
  • route_options [Block]. Route options for the virtual host.
    • rbac [Block]. RBAC configuration.
      • action (String).
      • principals [Block].
        • and_principals [Block].
          • any (Bool).
          • header [Block].
            • name (Required)(String).
            • value [Block]. The path and fqmn blocks.

Важно

Exactly one type of string matches exact, prefix or regex should be specified.

          - `exact` (String). Match exactly.
          - `prefix` (String). Match prefix.
          - `regex` (String). Match regex.
      - `remote_ip` (String). 
- `security_profile_id` (String). SWS profile ID.
  • route_options [Block]. Route options for the virtual host.
    • rbac [Block]. RBAC configuration.
      • action (String).
      • principals [Block].
        • and_principals [Block].
          • any (Bool).
          • header [Block].
            • name (Required)(String).
            • value [Block]. The path and fqmn blocks.

Важно

Exactly one type of string matches exact, prefix or regex should be specified.

        - `exact` (String). Match exactly.
        - `prefix` (String). Match prefix.
        - `regex` (String). Match regex.
    - `remote_ip` (String). 
  • security_profile_id (String). SWS profile ID.
  • virtual_host_id (String). The ID of a specific Virtual Host. Virtual Host ID is concatenation of HTTP Router ID and Virtual Host name with / symbol between them. For Example, http_router_id/vhost_name.

Была ли статья полезна?

Предыдущая
alb_target_group
Следующая
alb_backend_group
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»