Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • metastore_cluster

In this article:

  • Example usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for cluster_config
  • Nested Schema for logging
  • Nested Schema for maintenance_window
  • Nested Schema for timeouts
  • Import
  1. Terraform reference
  2. Resources
  3. Apache Hive Metastore
  4. Resources
  5. metastore_cluster

yandex_metastore_cluster (Resource)

Written by
Yandex Cloud
Updated at November 13, 2025
  • Example usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for cluster_config
    • Nested Schema for logging
    • Nested Schema for maintenance_window
    • Nested Schema for timeouts
  • Import

Managed Metastore cluster.

Example usageExample usage

//
// Create a new Metastore Cluster.
//
resource "yandex_metastore_cluster" "my_metastore_cluster" {
  name               = "metastore-created-with-terraform"
  subnet_ids         = [yandex_vpc_subnet.a.id]
  security_group_ids = [yandex_vpc_security_group.metastore-sg.id]
  service_account_id = yandex_iam_service_account.for-metastore.id

  cluster_config = {
    resource_preset_id = "c2-m8"
  }

  maintenance_window = {
    type = "WEEKLY"
    day  = "MON"
    hour = 12
  }

  description = "My awesome Metastore"

  logging = {
    enabled   = true
    folder_id = var.folder_id
    min_level = "INFO"
  }
}

SchemaSchema

RequiredRequired

  • cluster_config (Attributes) Hive Metastore cluster configuration. (see below for nested schema)
  • name (String) The resource name.
  • service_account_id (String) Service account with role managed-metastore.integrationProvider. For more information, see documentation.
  • subnet_ids (Set of String) The list of VPC subnets identifiers which resource is attached.

OptionalOptional

  • deletion_protection (Boolean) The true value means that resource is protected from accidental deletion. By default is set to false.
  • 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.
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • logging (Attributes) Cloud Logging configuration. (see below for nested schema)
  • maintenance_window (Attributes) Configuration of window for maintenance operations. (see below for nested schema)
  • security_group_ids (Set of String) The list of security groups applied to resource or their components.
  • timeouts (Block, Optional) (see below for nested schema)
  • version (String) Metastore server version.

Read-OnlyRead-Only

  • created_at (String) The creation timestamp of the resource.
  • endpoint_ip (String) IP address of Metastore server balancer endpoint.
  • id (String) The resource identifier.
  • network_id (String) VPC network identifier which resource is attached.
  • status (String) Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN.

Nested Schema for Nested Schema for cluster_config

Required:

  • resource_preset_id (String) The identifier of the preset for computational resources available to an instance (CPU, memory etc.).

Nested Schema for Nested Schema for logging

Required:

  • enabled (Boolean) Enables delivery of logs generated by Metastore to Cloud Logging.

Optional:

  • 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).

Nested Schema for Nested Schema for maintenance_window

Optional:

  • 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.

Nested Schema for 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). 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).

ImportImport

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

# terraform import yandex_metastore_cluster.<resource Name> <resource Id>
terraform import yandex_metastore_cluster.my_metastore_cluster <cluster-id>

Was the article helpful?

Previous
metastore_cluster
Next
alb_backend_group
© 2025 Direct Cursus Technology L.L.C.