yandex_metastore_cluster (Resource)
Статья создана
Обновлена 12 февраля 2026 г.
Managed Metastore cluster.
Example 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"
}
}
Arguments & 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.).
created_at(Read-Only) (String). The creation timestamp of the resource.deletion_protection(Bool). Thetruevalue means that resource is protected from accidental deletion. By default is set tofalse.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 providerfolder-idis 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 attributesfolder_idorlog_group_idshould be specified.log_group_id(String). Logs will be written to the specified log group. Exactly one of the attributesfolder_idorlog_group_idshould be specified.min_level(String). Minimum level of messages that will be sent to Cloud Logging. Can be eitherTRACE,DEBUG,INFO,WARN,ERRORorFATAL. If not set then server default is applied (currentlyINFO).
maintenance_window[Block]. Configuration of window for maintenance operations.day(String). Day of week for maintenance window. One ofMON,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 eitherANYTIMEorWEEKLY. IfWEEKLY, day and hour must be specified.
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 rolemanaged-metastore.integrationProvider. For more information, see documentation.status(Read-Only) (String). Status of the cluster. Can be eitherCREATING,STARTING,RUNNING,UPDATING,STOPPING,STOPPED,ERRORorSTATUS_UNKNOWN.subnet_ids(Required)(Set Of String). The list of VPC subnets identifiers which resource is attached.version(String). Metastore server version.
Import
The resource can be imported by using their resource ID. For getting it you can use Yandex Cloud Web Console
# terraform import yandex_metastore_cluster.<resource Name> <resource Id>
terraform import yandex_metastore_cluster.my_metastore_cluster <cluster-id>