Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for OpenSearch
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Stopping and starting a cluster
      • Managing backups
      • Managing cluster access
      • Configuring access to Object Storage
      • Maintenance
      • Deleting a cluster
    • User management
  • Access management
  • Inspections and recommendations
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Before deleting a cluster
  • Deleting a cluster
  1. Step-by-step guides
  2. Clusters
  3. Deleting a cluster

Deleting an OpenSearch cluster

Written by
Yandex Cloud
Updated at November 16, 2026
View as Markdown
  • Before deleting a cluster
  • Deleting a cluster

You can delete an OpenSearch cluster if you no longer need it. All data in the cluster will be deleted.

Before deleting a clusterBefore deleting a cluster

  • If deletion protection is on for the cluster, disable it.
  • Save the cluster ID.

You will need the cluster ID when restoring a deleted cluster from a backup.

After you delete a database cluster, its backups are retained and available for recovery for the period set in the cluster settings (7 days by default).

Deleting a clusterDeleting a cluster

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder where you want to delete a cluster.
  2. Navigate to Managed Service for OpenSearch.
  3. Click for the cluster in question and select Delete.
  4. Confirm cluster deletion and click Delete.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.

If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To delete a cluster, run this command:

yc managed-opensearch cluster delete <cluster_name_or_ID>

You can get the cluster name and ID with the list of clusters in the folder.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the guides on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

To delete a cluster created using Terraform:

  1. In the command line, go to the folder that houses the current Terraform configuration file with an infrastructure plan.

  2. Delete the resources using this command:

    terraform destroy
    

    Alert

    Terraform will delete all the resources you created using it, such as clusters, networks, subnets, and VMs.

  3. Type yes and press Enter.

Timeouts

The Terraform provider sets the following timeouts for Managed Service for OpenSearch cluster operations:

  • Creating a cluster, including by restoring it from a backup: 30 minutes.
  • Updating a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the timeout are aborted.

How do I change these limits?

Add a timeouts section to the cluster description, e.g.:

resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
  ...
  timeouts {
    create = "1h30m" # 1 hour 30 minutes
    update = "2h"    # 2 hours
    delete = "30m"   # 30 minutes
  }
}
  1. Get an IAM token for API authentication and put it into an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Cluster.Delete method, e.g., via the following cURL request:

    curl \
        --request DELETE \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>'
    
  3. View the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and put it into an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the ClusterService.Delete method, e.g., via the following gRPCurl request:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.opensearch.v1.ClusterService.Delete
    
  4. View the server response to make sure your request was successful.

Was the article helpful?

Previous
Maintenance
Next
Pre-configuration
© 2026 Direct Cursus Technology L.L.C.