Yandex Cloud
Search
Contact UsTry it for free
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for Valkey™
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Updating cluster settings
      • Valkey™ version upgrade
      • Stopping and starting a cluster
      • Managing cluster hosts
      • Migrating hosts to a different availability zone
      • Managing backups
      • Deleting a cluster
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Changing the cluster name and description
  • Configuring the use of FQDNs instead of IP addresses
  • Changing the data persistence mode
  • Changing the host class
  • Changing the disk type and increasing the storage size
  • Setting up automatic increase of storage size
  • Changing Valkey™ settings
  • Changing additional cluster settings
  • Enabling sharding
  • Moving a cluster
  • Editing security groups
  1. Step-by-step guides
  2. Clusters
  3. Updating cluster settings

Updating Valkey™ cluster settings

Written by
Yandex Cloud
Updated at November 26, 2025
  • Changing the cluster name and description
  • Configuring the use of FQDNs instead of IP addresses
  • Changing the data persistence mode
  • Changing the host class
  • Changing the disk type and increasing the storage size
  • Setting up automatic increase of storage size
  • Changing Valkey™ settings
  • Changing additional cluster settings
  • Enabling sharding
  • Moving a cluster
  • Editing security groups

After creating a cluster, you can:

  • Change the cluster name and description.

  • Configure the use of FQDNs instead of IP addresses.

  • Change the data persistence mode.

  • Change the host class.

  • Change the disk type and increase storage size.

  • Set up automatic increase of storage size.

  • Configure Valkey™ servers as described in the Valkey™ documentation. For a list of supported settings, see the Valkey™ settings section and the API reference.

  • Change additional cluster settings.

  • Enable sharding in a non-sharded cluster.

  • Move the cluster to another folder.

  • Edit security groups.

Learn more about other cluster updates:

  • Valkey™ version upgrade.

  • Migrating hosts to a different availability zone

  • Updating Valkey™ user settings

Changing the cluster name and descriptionChanging the cluster name and description

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under Basic parameters, enter a new name and description for the cluster.
  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To change cluster name and description:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Specify a new name and description in the cluster update command:

    yc managed-redis cluster update <cluster_name_or_ID> \
      --new-name <new_cluster_name> \
      --description <new_cluster_description>
    

Alert

Do not change the cluster name using Terraform. This will delete the existing cluster and create a new one.

To update the cluster description:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Edit the description parameter in the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      name        = "<cluster_name>"
      description = "<new_cluster_description>"
      ...
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "name,description",
                  "name": "<new_cluster_name>",
                  "description": "<new_cluster_description>"
                }'
    

    Where updateMask is the list of parameters to update as a single string, separated by commas.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "name", "description" ]
              },
              "name": "<new_cluster_name>",
              "description": "<new_cluster_description>" 
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where update_mask is the list of parameters to update as an array of paths[] strings.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Configuring the use of FQDNs instead of IP addressesConfiguring the use of FQDNs instead of IP addresses

If the relevant setting is disabled (by default), Valkey™ uses IP addresses as host addresses. If this setting is enabled, it will replace the host's IP address with its FQDN. For more information about this setting and its uses, see Using FQDNs instead of IP addresses.

Note

Some clients do not support this setting and will fail to connect to the cluster hosts. Such clients expect an IP address and will produce errors if you provide an FQDN instead.

Management console
CLI
Terraform
REST API
gRPC API

To enable or disable the use of FQDNs instead of IP addresses:

  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under Basic parameters, enable or disable Use FQDN instead of IP addresses.
  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To enable or disable the use of FQDNs instead of IP addresses:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Provide the required setting value in the update cluster command:

    yc managed-redis cluster update <cluster_name_or_ID> \
      --announce-hostnames <using_FQDNs_instead_of_IP_addresses>
    

    --announce-hostnames: Enables or disables using FQDNs instead of IP addresses: true or false.

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

To enable or disable the use of FQDNs instead of IP addresses:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Edit the announce_hostnames parameter in the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      name        = "<cluster_name>"
      ...
      announce_hostnames    = <using_FQDNs_instead_of_IP_addresses>
      ...
    }
    

    announce_hostnames: Enables or disables using FQDNs instead of IP addresses: true or false.

  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "announceHostnames",
                  "announceHostnames": <using_FQDNs_instead_of_IP_addresses>
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

      Here, we provide only one setting.

    • announceHostnames: Using FQDNs instead of IP addresses, true or false.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "announce_hostnames" ]
              },
              "announce_hostnames": <using_FQDNs_instead_of_IP_addresses>
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

      Here, we provide only one setting.

    • announce_hostnames: Using FQDNs instead of IP addresses, true or false.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Changing the data persistence modeChanging the data persistence mode

For more information about data persistence and its settings, see Persistence.

Management console
CLI
Terraform
REST API
gRPC API

To change the persistence mode:

  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under Basic parameters, select the persistence mode.
  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To change the persistence mode:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Provide the required setting value in the update cluster command:

    yc managed-redis cluster update <cluster_name_or_ID> \
      --persistence-mode <persistence_mode>
    

    The possible values are:

    • ON: Enable persistence.
    • OFF: Disable persistence.
    • ON_REPLICAS: Enable persistence on replicas only.

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

To change the persistence mode:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Edit the persistence_mode parameter in the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      name = "<cluster_name>"
      ...
      persistence_mode = "<persistence_mode>"
      ...
    }
    

    The possible values are:

    • ON: Enable persistence.
    • OFF: Disable persistence.
    • ON_REPLICAS: Enable persistence on replicas only.
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "persistenceMode",
                  "persistenceMode": "<persistence_mode>"
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

      Here, we provide only one setting.

    • persistenceMode: Persistence mode.

      The possible values are:

      • ON: Enable persistence.
      • OFF: Disable persistence.
      • ON_REPLICAS: Enable persistence on replicas only.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "persistence_mode" ]
              },
              "persistence_mode": "<persistence_mode>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

      Here, we provide only one setting.

    • persistence_mode: Persistence mode.

      The possible values are:

      • ON: Enable persistence.
      • OFF: Disable persistence.
      • ON_REPLICAS: Enable persistence on replicas only.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Changing the host classChanging the host class

When changing the host class:

  • Your single-host cluster will be unavailable for a few minutes with database connections terminated.
  • In a non-sharded multiple-host cluster:
    • The master will change. Each host is stopped and updated one by one, remaining unavailable for a few minutes.
    • Using a special FQDN does not guarantee a stable database connection: user sessions may be terminated.
  • In a sharded cluster:
    • The master will change in each multiple-host shard.
    • Hosts in each shard will be stopped and updated one at a time. The shard's stopped master host will be unavailable for a few minutes.
    • Master host name resolution may not be available. If public access to the host is enabled, you can only connect using the host IP address.

We recommend changing the host class only when your cluster has no active workload.

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder with the cluster you need.

  2. Select Yandex Managed Service for Valkey™.

  3. Select the cluster in question.

  4. At the top of the page, click Edit.

  5. Under Host class:

    • Select a platform in the Platform field.
    • Select the Type of the virtual machine the hosts will be deployed on:
      • high-memory: Increased RAM per 1 vCPU.
      • burstable: Partial guaranteed share of vCPU. VMs with a guaranteed share of less than 100% ensure the specified level of performance with a possible temporary performance increase up to 100%. Clusters with such hosts are good for tasks that do not require guaranteed permanent performance (for example, testing).
    • Modify the host configuration.
  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To change the host class for a cluster:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Get the list of available host classes (the ZONE IDS column specifies the availability zones where you can select the appropriate class):

    yc managed-redis resource-preset list
    

    Result:

    +-------------+--------------------------------+----------+
    |     ID      |            ZONE IDS            |  MEMORY  |
    +-------------+--------------------------------+----------+
    | b1.nano     | ru-central1-a, ru-central1-b,  | 2.0 GB   |
    |             | ru-central1-d                  |          |
    | b1.small    | ru-central1-a, ru-central1-b,  | 4.0 GB   |
    |             | ru-central1-d                  |          |
    | hm1.nano    | ru-central1-a, ru-central1-b,  | 8.0 GB   |
    |             | ru-central1-d                  |          |
    | hm1.micro   | ru-central1-a, ru-central1-b,  | 12.0 GB  |
    | ...                                                     |
    +-----------+----------------------------------+----------+
    
  3. Run this command, specifying the host class you need:

    yc managed-redis cluster update <cluster_name_or_ID> \
      --resource-preset <host_class_ID>
    

    Yandex Managed Service for Valkey™ will start updating the host class for your cluster.

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, change the resource_preset_id parameter value under resources:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
      resources {
        resource_preset_id = "<host_class>"
        ...
        }
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "configSpec.resources.resourcePresetId",
                  "configSpec": {
                    "resources": {
                      "resourcePresetId": "<host_class>"
                    }
                  }
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

      In this case, only one parameter is provided.

    • configSpec.resources.resourcePresetId: New host class. To retrieve a list of supported values, use the ResourcePreset.List method.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "config_spec.resources.resource_preset_id" ]
              },
              "config_spec": {
                "resources": {
                  "resource_preset_id": "<host_class>"
                }
              }
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

      Only one parameter is provided in this case.

    • config_spec.resources.resource_preset_id: New host class. To retrieve a list of supported values, use the ResourcePreset.List method.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

The Yandex Managed Service for Valkey™ cluster is unavailable for about five to seven minutes after changing the host class.

Changing the disk type and increasing the storage sizeChanging the disk type and increasing the storage size

Make sure the cloud has enough quota to increase the storage size. Open the cloud's Quotas page and check the HDD storage capacity and SSD storage capacity lines under Managed Databases to make sure there is available quota for storage space.

Management console
CLI
Terraform
REST API
gRPC API

To change the disk type and increase the storage size for a cluster:

  1. In the management console, select the folder with the cluster you need.

  2. Select Yandex Managed Service for Valkey™.

  3. Select the cluster in question.

  4. At the top of the page, click Edit.

  5. Under Storage size:

    • Select the disk type.
    • Specify the required disk size.
  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To increase storage size of Valkey™ hosts:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Specify the required storage size in the update cluster command. The new size must be at least as large as the current disk_size in the cluster properties.

    yc managed-redis cluster update <cluster_name_or_ID> \
      --disk-size <storage_size_in_GB>
    

    If all the criteria are met, Yandex Managed Service for Valkey™ starts increasing the size of the Valkey™ host disks.

To increase your cluster storage size:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, change the disk_size parameter value under resources:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
      resources {
        disk_size = <storage_size_in_GB>
        ...
        }
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "configSpec.resources.diskTypeId,configSpec.resources.diskSize",
                  "configSpec": {
                    "resources": {
                      "diskTypeId": "<disk_type>",
                      "diskSize": "<storage_size_in_bytes>"
                    }
                  }
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

    • configSpec.resources: Storage parameters:

      • diskTypeId: Disk type.
      • diskSize: New storage size, in bytes.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ 
                  "config_spec.resources.disk_type_id",
                  "config_spec.resources.disk_size"
                ]
              },
              "config_spec": {
                "resources": {
                  "disk_type_id": "<disk_type>",
                  "disk_size": "<storage_size_in_bytes>"
                }
              }
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

    • config_spec.resources: Storage parameters:

      • disk_type_id: Disk type.
      • disk_size: New storage size, in bytes.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Setting up automatic increase of storage sizeSetting up automatic increase of storage size

For more information about storage and automatic increase, see Storage in Yandex Managed Service for Valkey™.

Make sure the cloud has enough quota to increase the storage size. Open the cloud's Quotas page and check the HDD storage capacity and SSD storage capacity lines under Managed Databases to make sure there is available quota for storage space.

Management console
CLI
Terraform
REST API
gRPC API
  1. Navigate to the folder dashboard and select Yandex Managed Service for Valkey™.

  2. In the cluster row, click , then select Edit.

  3. Under Resources, configure the automatic increase of disk size:

    • In the Increase size field, specify the conditions for the actions below:

      • Storage size increase during the next maintenance window once the fill level exceeds the specified percentage. If you set this condition, configure the maintenance schedule.

      • Storage size increase immediately once the fill level exceeds the specified percentage.

        Warning

        If you set both conditions, make sure the immediate increase threshold is higher than the scheduled one.

    • In the Maximum storage size field, specify the maximum storage size that can be set during automatic scaling.

    Warning

    • You cannot decrease the storage size.
    • During storage resizing, cluster hosts will be stopped and updated one at a time.
  4. Save your changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To set up automatic increase of storage size:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Set the maximum storage size and conditions for its increase in the update cluster command.

    yc managed-redis cluster update <cluster_ID_or_name> \
        --disk-size-autoscaling planned-usage-threshold=<scheduled_increase_percentage>,`
                                `emergency-usage-threshold=<immediate_increase_percentage>,`
                                `disk-size-limit=<maximum_storage_size_in_GB> \
    

    Where:

    • planned-usage-threshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

      Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

      If you set this condition, configure the maintenance schedule.

    • emergency-usage-threshold: Storage utilization percentage to trigger an immediate storage increase.

      Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

      Warning

      If you specify both thresholds, emergency-usage-threshold must not be less than planned-usage-threshold.

    • disk-size-limit: Maximum storage size after the increase, in GB.

    Warning

    • You cannot decrease the storage size.
    • During storage resizing, cluster hosts will be stopped and updated one at a time.

To set up automatic increase of storage size:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Add the following section to the cluster description:

    disk_size_autoscaling {
      planned_usage_threshold   = "<scheduled_increase_percentage>"
      emergency_usage_threshold = "<immediate_increase_percentage>"
      disk_size_limit           = "<maximum_storage_size_in_GiB>"
    }
    

    Where:

    • planned_usage_threshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

      Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

      If you set this condition, configure the maintenance schedule under maintenance_window.

    • emergency_usage_threshold: Storage utilization percentage to trigger an immediate storage increase.

      Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

      Warning

      If you specify both thresholds, emergency_usage_threshold must not be less than planned_usage_threshold.

    • disk_size_limit: Maximum storage size after the increase, in gibibytes.

    Warning

    • You cannot decrease the storage size.
    • During storage resizing, cluster hosts will be stopped and updated one at a time.
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

    Time limits

    A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

    • Creating a cluster, including by restoring one from a backup: 15 minutes.
    • Editing a cluster: 60 minutes.
    • Deleting a cluster: 15 minutes.

    Operations exceeding the set timeout are interrupted.

    How do I change these limits?

    Add the timeouts block to the cluster description, for example:

    resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "configSpec.diskSizeAutoscaling",
                  "configSpec": {
                    "diskSizeAutoscaling": {
                      "plannedUsageThreshold": "<scheduled_increase_percentage>",
                      "emergencyUsageThreshold": "<immediate_increase_percentage>",
                      "diskSizeLimit": "<maximum_storage_size_in_bytes>"
                    }
                  }
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.
    • diskSizeAutoscaling: Automatic storage size increase settings:

      • plannedUsageThreshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

        Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

        If you set this condition, configure the maintenance schedule with the help of maintenanceWindow.

      • emergencyUsageThreshold: Storage utilization percentage to trigger an immediate storage increase.

        Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

        Warning

        If you specify both thresholds, emergencyUsageThreshold must not be less than plannedUsageThreshold.

      • diskSizeLimit: Maximum storage size after the increase, in bytes.

      Warning

      • You cannot decrease the storage size.
      • During storage resizing, cluster hosts will be stopped and updated one at a time.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "config_spec.disk_size_autoscaling" ]
              },
              "config_spec": {
                "disk_size_autoscaling": {
                  "planned_usage_threshold": "<scheduled_increase_percentage>",
                  "emergency_usage_threshold": "<immediate_increase_percentage>",
                  "disk_size_limit": "<maximum_storage_size_in_bytes>"
                }
              }
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).
    • disk_size_autoscaling: Automatic storage size increase settings:

      • planned_usage_threshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

        Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

        If you set this condition, configure the maintenance schedule with the help of maintenance_window.

      • emergency_usage_threshold: Storage utilization percentage to trigger an immediate storage increase.

        Use a value between 0 and 100%. The default setting is 0 (automatic increase disabled).

        Warning

        If you specify both thresholds, emergency_usage_threshold must not be less than planned_usage_threshold.

      • disk_size_limit: Maximum storage size after the increase, in bytes.

      Warning

      • You cannot decrease the storage size.
      • During storage resizing, cluster hosts will be stopped and updated one at a time.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Changing Valkey™ settingsChanging Valkey™ settings

You can change the DBMS settings for the hosts in your cluster. You can find all the supported settings in Valkey™ settings and in the API reference.

Management console
Terraform
REST API
gRPC API

To update the DBMS settings for the cluster:

  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under DBMS settings, click Settings.
  6. Configure the available parameters according to the Valkey™ documentation.
  7. Click Save.

To update the DBMS settings for the cluster:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, edit these config section parameters:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
      config {
        password         = "<password>"
        timeout          = <time>
        maxmemory_policy = "<policy>"
        ...
      }
    }
    

    Where:

    • timeout: Time, in seconds, before disabling inactive clients.
    • maxmemory_policy: Memory management policy if low on memory.

    The password must be between 8 and 128 characters long. The password must meet the [a-zA-Z0-9@=+?*.,!&#$^<>_-]* regular expression.

  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "configSpec.redisConfig_<Valkey™_version>.<setting_1>,configSpec.redisConfig_<Valkey™_version>.<setting_2>,...,configSpec.redisConfig_<Valkey™_version>.<setting_N>",
                  "configSpec": {
                    "redisConfig_<Valkey™_version>": {
                      "<setting_1>": "<value_1>",
                      "<setting_2>": "<value_2>",
                      ...
                      "<setting_N>": "<value_N>"
                    }
                  }
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

    • configSpec.redisConfig_<Valkey™_version>: Valkey™ settings. Specify each setting on a separate line, separated by commas.

      See the method description for the list of Valkey™ versions available for this parameter. See Valkey™ settings for descriptions and possible values of the settings.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ 
                  "config_spec.redis_config_<Valkey™_version>.<setting_1>",
                  "config_spec.redis_config_<Valkey™_version>.<setting_2>",
                  ...
                  "config_spec.redis_config_<Valkey™_version>.<setting_N>"
                ]
              },
              "config_spec": {
                "redis_config_<Valkey™_version>": {
                  "<setting_1>": "<value_1>",
                  "<setting_2>": "<value_2>",
                  ...
                  "<setting_N>": "<value_N>"
                }
              }
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

    • config_spec.redis_config_<Valkey™_version>: Valkey™ settings. Specify each setting on a separate line, separated by commas.

      See the method description for the list of Valkey™ versions available for this parameter. See Valkey™ settings for descriptions and possible values of the settings.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Changing additional cluster settingsChanging additional cluster settings

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder with the cluster you need.

  2. Select Yandex Managed Service for Valkey™.

  3. Select the cluster in question.

  4. At the top of the page, click Edit.

  5. Change additional cluster settings:

    • Backup start time (UTC): UTC time when you want to start creating a cluster backup (in 24-hour format). If the time is not set, the backup will start at 22:00 UTC.

    • Maintenance window: Maintenance window settings:

      • To enable maintenance at any time, select arbitrary (default).
      • To specify the preferred maintenance start time, select by schedule and specify the desired day of the week and UTC hour. For example, you can choose a time when the cluster is least loaded.

      Maintenance operations are carried out both on enabled and disabled clusters. They may include updating the DBMS, applying patches, and so on.

    • Deletion protection: Manages cluster protection against accidental deletion.

      Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

    • WebSQL access: Enables you to run SQL queries against cluster databases from the Yandex Cloud management console using Yandex WebSQL.

  6. Click Save changes.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To change additional cluster settings:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Run the following command with the list of settings to update:

    yc managed-redis cluster update <cluster_name_or_ID> \
        --backup-window-start <time> \
        --maintenance-window type=<maintenance_type>,`
                            `day=<day_of_week>,`
                            `hour=<hour> \
        --websql-access=<true_or_false> \
        --deletion-protection
    

You can update the following settings:

  • --backup-window-start: The cluster backup start time, set in UTC format HH:MM:SS. If the time is not set, the backup will start at 22:00 UTC.
  • --maintenance-window: Maintenance window settings (including for disabled clusters), where type is the maintenance type:

    • anytime: At any time (default).
    • weekly: On a schedule. For this value, also specify the following:
      • day: Day of week, i.e., MON, TUE, WED, THU, FRI, SAT, or SUN.
      • hour: Hour of day (UTC), from 1 to 24.
  • --websql-access: Enables SQL queries against cluster databases from the Yandex Cloud management console using Yandex WebSQL. The default value is false.

  • --deletion-protection: Cluster protection from accidental deletion, true or false.

    Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

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

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, edit the parameters you need:

    • To set the backup start time, add the backup_window_start section.

      resource "yandex_mdb_redis_cluster" "<cluster_name>" {
          ...
          backup_window_start {
              hours   = <hours>
              minutes = <minutes>
          }
      }
      

      Where:

      • hours: Backup start hour, UTC, in HH format: 0 to 23.
      • minutes: Backup start minute, UTC, in mm format: 0 to 59.
    • To set up the maintenance window (for disabled clusters as well), add the maintenance_window section to the cluster description:

      resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
          maintenance_window {
              day  = <day_of_week>
              hour = <start_hour>
              type = "ANYTIME"
          }
      }
      

      Where type is the maintenance type, which can be:

      • ANYTIME: Any time.
      • WEEKLY: On a schedule. When specifying this value, you also need to set the following parameters:
        • day: Day of week in DDD format: MON, TUE, WED, THU, FRI, SAT, or SUN.
        • hour: Time of day (UTC) in HH format, from 1 to 24.
    • To enable cluster protection from accidental deletion by a user of your cloud, add the deletion_protection field set to true to your cluster description:

      resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
              deletion_protection = false
      }
      
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "configSpec.backupWindowStart,maintenanceWindow,deletionProtection",
                  "configSpec": {
                    "backupWindowStart": {
                      "hours": "<hours>",
                      "minutes": "<minutes>",
                      "seconds": "<seconds>",
                      "nanos": "<nanoseconds>"
                    }
                  },
                  "maintenanceWindow": {
                    "weeklyMaintenanceWindow": {
                      "day": "<day_of_week>",
                      "hour": "<hour>"
                    }
                  },
                  "deletionProtection": <cluster_deletion_protection>
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

    • configSpec.backupWindowStart: Backup window settings.

      Here, specify the backup start time:

      • hours: Between 0 and 23 hours.
      • minutes: Between 0 and 59 minutes.
      • seconds: Between 0 and 59 seconds.
      • nanos: Between 0 and 999999999 nanoseconds.
    • maintenanceWindow: Maintenance window settings, including those for disabled clusters. Provide one of the two parameters:

      • anytime: Maintenance takes place at any time.

      • weeklyMaintenanceWindow: Maintenance takes place once a week at the specified time:

        • day: Day of week in DDD format: MON, TUE, WED, THU, FRI, SAT, or SUN.
        • hour: Time of day (UTC) in HH format, from 1 to 24.
    • deletionProtection: Cluster protection from accidental deletion, true or false.

      Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ 
                  "config_spec.backup_window_start",
                   "maintenance_window",
                   "deletion_protection"
                ]
              },
              "config_spec": {
                "backup_window_start": {
                  "hours": "<hours>",
                  "minutes": "<minutes>",
                  "seconds": "<seconds>",
                  "nanos": "<nanoseconds>"
                }
              },
              "maintenance_window": {
                "weekly_maintenance_window": {
                  "day": "<day_of_week>",
                  "hour": "<hour>"
                }
              },
              "deletion_protection": <cluster_deletion_protection>
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

    • config_spec.backup_window_start: Backup window settings.

      Here, specify the backup start time:

      • hours: Between 0 and 23 hours.
      • minutes: Between 0 and 59 minutes.
      • seconds: Between 0 and 59 seconds.
      • nanos: Between 0 and 999999999 nanoseconds.
    • maintenance_window: Maintenance window settings, including those for disabled clusters. Provide one of the two parameters:

      • anytime: Maintenance takes place at any time.

      • weekly_maintenance_window: Maintenance takes place once a week at the specified time:

        • day: Day of week in DDD format: MON, TUE, WED, THU, FRI, SAT, or SUN.
        • hour: Time of day (UTC) in HH format, from 1 to 24.
    • deletion_protection: Cluster protection from accidental deletion, true or false.

      Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Enabling shardingEnabling sharding

You can enable sharding in a non-sharded cluster to make it a sharded one.

Warning

You cannot disable sharding in a cluster where it is already enabled.

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under Basic parameters, enable Cluster sharding.
  6. Click Save changes.

Once sharding is enabled, all the existing cluster hosts will be added to the single shard1.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To enable sharding:

  1. View the description of the CLI command to enable sharding:

    yc managed-redis cluster enable-sharding --help
    
  2. Run this command:

    yc managed-redis cluster enable-sharding <cluster_ID>
    

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

Once sharding is enabled, all the existing cluster hosts will be added to the single shard1.

To enable sharding:

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Add the sharded parameter set to true to the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
        ...
        sharded = true
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

Once sharding is enabled, all the existing cluster hosts will be added to the single shard1.

You can also manage shards.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>:enable_sharding'
    

    You can request the cluster ID with the list of clusters in the folder.

    Once sharding is enabled, all the existing cluster hosts will be added to the single shard1.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.EnableSharding call and send the following request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.EnableSharding
    

    You can request the cluster ID with the list of clusters in the folder.

    Once sharding is enabled, all the existing cluster hosts will be added to the single shard1.

  4. Check the server response to make sure your request was successful.

Moving a clusterMoving a cluster

Management console
CLI
Terraform
REST API
gRPC API
  1. Navigate to the folder dashboard and select Yandex Managed Service for Valkey™.
  2. Click to the right of the cluster you want to move.
  3. Select Move.
  4. Select the destination folder for your cluster.
  5. Click Move.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To move a cluster:

  1. View the description of the CLI move cluster command:

    yc managed-redis cluster move --help
    
  2. Run this command, specifying the destination folder:

    yc managed-redis cluster move <cluster_ID> \
       --destination-folder-name=<destination_folder_name>
    

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

  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, edit or add the folder_id parameter value:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
      folder_id = "<destination_folder_ID>"
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>:move' \
        --data '{
                  "destinationFolderId": "<folder_ID>"
                }'
    

    Where destinationFolderId is the ID of the folder to move the cluster to.

    You can request the cluster ID with the list of clusters in the folder and the folder ID with the list of folders in the cloud.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Move call and send the following request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "destination_folder_id": "<folder_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Move
    

    Where destination_folder_id is the ID of the folder to move the cluster to.

    You can request the cluster ID with the list of clusters in the folder and the folder ID with the list of folders in the cloud.

  4. Check the server response to make sure your request was successful.

Editing security groupsEditing security groups

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, select the folder with the cluster you need.
  2. Select Yandex Managed Service for Valkey™.
  3. Select the cluster in question.
  4. At the top of the page, click Edit.
  5. Under Network settings, select security groups for cluster network traffic.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To edit the list of security groups for your cluster:

  1. View the description of the CLI command for updating a cluster:

    yc managed-redis cluster update --help
    
  2. Run this command, specifying the security groups:

    yc managed-redis cluster update <cluster_name_or_ID> \
      --security-group-ids <list_of_security_group_IDs>
    
  1. Open the current Terraform configuration file describing your infrastructure.

    For information on how to create this file, see Creating a cluster.

  2. Edit the security_group_ids parameter in the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster" "<cluster_name>" {
      ...
      security_group_ids = [<list_of_security_group_IDs>]
    }
    
  3. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

Time limits

A Terraform provider sets the timeout for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring one from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the set timeout are interrupted.

How do I change these limits?

Add the timeouts block to the cluster description, for example:

resource "yandex_mdb_redis_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 set it as an environment variable:

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

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>' \
        --data '{
                  "updateMask": "securityGroupIds",
                  "securityGroupIds": [
                    "<security_group_1_ID>",
                    "<security_group_2_ID>",
                    ...
                    "<security_group_N_ID>"
                  ]
                }'
    

    Where:

    • updateMask: Comma-separated list of settings you want to update.

      Here, we provide only one setting.

    • securityGroupIds: Security group IDs.

    You can request the cluster ID with the list of clusters in the folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and set it as 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_mask": {
                "paths": [ "security_group_ids" ]
              },
              "security_group_ids": [
                "<security_group_1_ID>",
                "<security_group_2_ID>",
                ...
                "<security_group_N_ID>"
              ] 
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.Update
    

    Where:

    • update_mask: List of settings you want to update as an array of strings (paths[]).

      Here, we provide only one setting.

    • security_group_ids: Security group IDs.

    You can request the cluster ID with the list of clusters in the folder.

  4. Check the server response to make sure your request was successful.

Warning

You may need to additionally configure security groups to connect to the cluster.

Was the article helpful?

Previous
Creating a cluster
Next
Valkey™ version upgrade
© 2025 Direct Cursus Technology L.L.C.