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

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

  • Example usage
  • Arguments & Attributes Reference
  • Import
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Managed Service for Trino
  4. Resources
  5. trino_cluster

yandex_trino_cluster (Resource)

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

Managed Trino cluster.

Example usageExample usage

resource "yandex_trino_cluster" "trino" {
  name               = "trino-created-with-terraform"
  service_account_id = yandex_iam_service_account.trino.id
  subnet_ids         = [yandex_vpc_subnet.a.id, yandex_vpc_subnet.b.id, yandex_vpc_subnet.d.id]

  coordinator = {
    resource_preset_id = "c8-m32"
  }

  worker = {
    fixed_scale = {
      count = 4
    }
    resource_preset_id = "c4-m16"
  }


  retry_policy = {
    additional_properties = {
      fault-tolerant-execution-max-task-split-count = 1024
    }
    policy = "TASK"
    exchange_manager = {
      additional_properties = {
        exchange.sink-buffer-pool-min-size = 16
      }
      service_s3 = {}
    }
  }

  # resource_groups = file("resource-groups.json")
  resource_groups = jsonencode(
    {
      "rootGroups" : [
        {
          "name" : "global",
          "softMemoryLimit" : "80%",
          "hardConcurrencyLimit" : 100,
          "maxQueued" : 1000,
          "schedulingPolicy" : "weighted",
          "subGroups" : [
            {
              "name" : "adhoc",
              "softMemoryLimit" : "10%",
              "hardConcurrencyLimit" : 50,
              "maxQueued" : 1,
              "schedulingWeight" : 10,
              "subGroups" : [
                {
                  "name" : "other",
                  "softMemoryLimit" : "10%",
                  "hardConcurrencyLimit" : 2,
                  "maxQueued" : 1,
                  "schedulingWeight" : 10,
                  "schedulingPolicy" : "weighted_fair",
                  "subGroups" : [
                    {
                      "name" : "$${USER}",
                      "softMemoryLimit" : "10%",
                      "hardConcurrencyLimit" : 1,
                      "maxQueued" : 100
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "admin",
          "softMemoryLimit" : "100%",
          "hardConcurrencyLimit" : 50,
          "maxQueued" : 100,
          "schedulingPolicy" : "query_priority"
        }
      ],
      "selectors" : [
        {
          "user" : "bob",
          "userGroup" : "admin",
          "queryType" : "DATA_DEFINITION",
          "source" : "jdbc#(?<toolname>.*)",
          "clientTags" : [
            "hipri"
          ],
          "group" : "admin"
        },
        {
          "group" : "global.adhoc.other.$${USER}"
        }
      ],
      "cpuQuotaPeriod" : "1h"
    }
  )


  query_properties = {
    "query.max-memory-per-node"     = "7GB"
    "memory.heap-headroom-per-node" = "31%"
    "query.max-memory"              = "13GB"
    "query.max-total-memory"        = "21GB"
  }

  maintenance_window = {
    day  = "MON"
    hour = 15
    type = "ANYTIME"
  }
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • coordinator [Block]. Configuration of coordinator instances.
    • resource_preset_id (Required)(String). The identifier of the preset for computational resources available to an instance (CPU, memory etc.).
  • created_at (Read-Only) (String). The creation timestamp of the resource.
  • deletion_protection (Bool). The true value means that resource is protected from accidental deletion.
  • description (String). The resource description.
  • folder_id (String). The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • id (Read-Only) (String). The resource identifier.
  • labels (Map Of String). A set of key/value label pairs which assigned to resource.
  • logging [Block]. Cloud Logging configuration.
    • enabled (Required)(Bool). Enables delivery of logs generated by the Trino components to Cloud Logging.
    • folder_id (String). Logs will be written to default log group of specified folder. Exactly one of the attributes folder_id or log_group_id should be specified.
    • log_group_id (String). Logs will be written to the specified log group. Exactly one of the attributes folder_id or log_group_id should be specified.
    • min_level (String). Minimum level of messages that will be sent to Cloud Logging. Can be either TRACE, DEBUG, INFO, WARN, ERROR or FATAL. If not set then server default is applied (currently INFO).
  • maintenance_window [Block]. Configuration of window for maintenance operations.
    • day (String). Day of week for maintenance window. One of MON, TUE, WED, THU, FRI, SAT, SUN.
    • hour (Number). Hour of day in UTC time zone (1-24) for maintenance window.
    • type (String). Type of maintenance window. Can be either ANYTIME or WEEKLY. If WEEKLY, day and hour must be specified.
  • name (Required)(String). The resource name.
  • private_access (Bool). Enables access to the cluster only via private endpoint.
  • query_properties (Map Of String). Query properties configuration.
  • resource_groups_json (String). Resource groups configuration as a Trino-like json. Note, that some fields are not supported in Managed Trino, refer to documentation for more details. We recommend using jsonencode() as it can help sidestep different issues with formatting, whitespace and other nuances inherent to JSON.
  • retry_policy [Block]. Configuration for retry policy, specifying the spooling storage destination and other settings.
    • additional_properties (Map Of String). Additional properties.
    • exchange_manager [Block]. Configuration for exchange manager.
      • additional_properties (Map Of String). Additional properties.
      • service_s3 [Block]. Use S3 created on service side as exchange manager.
    • policy (Required)(String). Retry policy level
  • security_group_ids (Set Of String). The list of security groups applied to resource or their components.
  • service_account_id (Required)(String). Service account which linked to the resource. For more information, see documentation.
  • subnet_ids (Required)(Set Of String). The list of VPC subnets identifiers which resource is attached.
  • tls [Block]. Configuration for TLS.
    • trusted_certificates (List Of String). Trusted CA-certificates. Each element should contain single self-signed CA-certificate or chain of CA-certificates where first certificate if leaf and last certificate is self-signed root.
  • version (String). Trino version. Format: "Number".
  • worker [Block]. Configuration of worker instances.
    • auto_scale [Block]. A scaling policy that dynamically adjusts the number of worker instances based on the cluster's workload.
      • max_count (Required)(Number). The maximum number of worker instances.
      • min_count (Required)(Number). The minimum number of worker instances.
    • fixed_scale [Block]. A fixed scaling policy that specifies a fixed number of worker instances.
      • count (Required)(Number). Specifies the number of worker instances.
    • resource_preset_id (Required)(String). The identifier of the preset for computational resources available to an instance (CPU, memory etc.).

ImportImport

The resource can be imported by using their resource ID. For getting it you can use Yandex Cloud Web Console or Yandex Cloud CLI.

# terraform import yandex_trino_cluster.<resource Name> <resource Id>
terraform import yandex_tirno_cluster.my_trino_cluster c9qk5**********h6a91

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

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