Yandex Cloud
Документация
ПрезентацияСвязаться с намиНачать бесплатно
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Настройка аутентификации Terraform-провайдера Yandex Cloud
  • Вопросы и ответы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • metastore_cluster
          • metastore_cluster_change_freeze
          • metastore_cluster_iam_binding

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

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

yandex_metastore_cluster (Resource)

Статья создана
Yandex Cloud
Обновлена 2 декабря 2026 г.
Открыть Markdown
  • Example usage
  • Arguments & Attributes Reference
  • 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"
    warehouse_config = {
      s3 = {
        bucket = "my-metastore-warehouse"
        path   = "data/warehouse"
      }
    }
  }

  version = "4.2"

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

  description = "My awesome Metastore"

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

Arguments & Attributes ReferenceArguments & Attributes Reference

  • cluster_config [Block]. Hive Metastore cluster configuration.
    • resource_preset_id (Required)(String). The identifier of the preset for computational resources available to an instance (CPU, memory etc.).
    • warehouse_config [Block]. Warehouse configuration for Hive Metastore. Required for HMS version 4.2+.
      • s3 [Block]. S3-compatible storage configuration for warehouse.
        • bucket (Required)(String). Name of the S3 bucket used as warehouse storage.
        • path (String). Path prefix within the bucket for warehouse data.
  • 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. By default is set to false.
  • description (String). The resource description.
  • endpoint_ip (Read-Only) (String). IP address of Metastore server balancer endpoint.
  • 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 Metastore 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.
  • maintenance_windows [Block]. Maintenance schedule. Conflicts with maintenance_window. Times are UTC. Omitting both attributes preserves the existing schedule; set ANYTIME explicitly to remove time restrictions.
    • slot [Block]. Unordered weekly slots. Must not overlap, including across the end of the week. At least one slot must permit temporary unavailability.
      • allow_temporary_unavailability (Bool). Whether temporary unavailability is allowed during this maintenance slot. Defaults to false. Must be true for at least one weekly slot.
      • day (Required)(String). UTC weekday: MON, TUE, WED, THU, FRI, SAT or SUN.
      • duration (Required)(String). Duration from 1h through 24h with minute precision, for example 3h or 90m.
      • start_time (Required)(String). UTC start time in HH:MM:00 format, with minute precision.
    • type (Required)(String). ANYTIME or WEEKLY. ANYTIME forbids slots; WEEKLY requires at least one.
  • name (Required)(String). The resource name.
  • network_id (Read-Only) (String). VPC network identifier which resource is attached.
  • security_group_ids (Set Of String). The list of security groups applied to resource or their components.
  • service_account_id (Required)(String). Service account with role managed-metastore.integrationProvider. For more information, see documentation.
  • status (Read-Only) (String). Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN.
  • subnet_ids (Required)(Set Of String). The list of VPC subnets identifiers which resource is attached.
  • version (String). Metastore server version.
  • timeouts [Block].
    • 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).

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_metastore_cluster.<resource Name> <resource Id>
terraform import yandex_metastore_cluster.my_metastore_cluster <cluster-id>

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

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