Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • trino_access_control
          • trino_catalog
          • trino_cluster
          • trino_cluster_iam_binding

In this article:

  • Example usage
  • Arguments & Attributes Reference
  • Import
  1. Terraform reference
  2. Resources
  3. Managed Service for Trino
  4. Resources
  5. trino_cluster

yandex_trino_cluster (Resource)

Written by
Yandex Cloud
Updated at February 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

Was the article helpful?

Previous
trino_catalog
Next
trino_cluster_iam_binding
© 2026 Direct Cursus Technology L.L.C.