Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex MetaData Hub
  • About Yandex MetaData Hub
    • Getting started
      • Viewing a connection
      • Creating a connection
      • Editing a connection
      • Configuring connection access permissions
      • Deleting a connection
      • Getting operation details
      • Canceling an operation
    • Service roles for access management
    • CLI reference
    • Terraform reference
  • Access management
  • Quotas and limits
  • Pricing policy
  • Public materials
  • Release notes
  1. Connection Manager
  2. Step-by-step guides
  3. Editing a connection

Editing a connection

Written by
Yandex Cloud
Updated at November 20, 2025

To change connection settings:

Management console
CLI
Terraform
API
  1. In the management console, select a folder.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. In the list of connections, click to the right of the connection you want to edit.
  5. Select Edit.
  6. Change the required connection parameters, such as description, labels, database server settings, or user authentication information.
  7. Click Apply to save the 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.

You can update settings of a connection to a cluster with a managed database or to a custom database installation.

  1. To update settings of a connection to a cluster with a managed database:

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

      yc metadata-hub connection-manager connection update <database_type> --help
      

      The supported database types are postgresql, mysql, clickhouse, mongodb, opensearch, valkey, greenplum, and kafka.

    2. Update your connection by running this command:

      yc metadata-hub connection-manager connection update <database_type> <connection_ID> \
        --name <connection_name> \
        --user <username> \
        --password <password> \
        --managed-cluster-id <cluster_ID>
      

      Where:

      • --name: Connection name.

      • --user: Username to connect to the cluster.

      • --password: Password.

      • --managed-cluster-id: Cluster ID. You can get the cluster ID with the list of clusters in the folder.

      You can get the connection ID with the list of connections in the folder.

    3. You can update the list of databases for all connections, except Managed Service for OpenSearch and Managed Service for Apache Kafka® connections, by running this command:

      yc metadata-hub connection-manager connection update <database_type> <connection_ID> \
        --databases <database_list>
      

      Where --databases is a comma-separated list of databases.

      Make sure the user has the required access permissions.

  2. To update settings of a connection to a custom database installation:

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

      yc metadata-hub connection-manager connection update <database_type> --help
      

      The supported database types are postgresql, mysql, clickhouse, mongodb, redis, opensearch, trino, valkey, greenplum, and kafka.

    2. Update your connection by running this command:

      yc metadata-hub connection-manager connection update <database_type> <connection_ID> \
        --name <connection_name> \
        --user <username> \
        --password <password> \
        --ca-certificate <path_to_certificate>
      

      Where:

      • --name: Connection name.

      • --description: Connection description.

      • --labels: Comma-separated list of labels in "<key>":"<value>" format.

      • --user: Username to connect to the cluster.

      • --password: Password.

      • --ca-certificate: Path to your TLS CA certificate file.

        TLS is enabled by default; to disable it, use the --tls-disabled flag.

    3. You can also update the following:

      • List of hosts for all connections, except Trino connections, by running this command:

        yc metadata-hub connection-manager connection update <database_type> <connection_ID> \
          --hosts <list_of_hosts>
        

        Where --hosts is a comma-separated list of hosts.

        Warning

        Host notation format depends on the database type. For more information, see the CLI reference.

      • Coordinator parameters for connecting to Trino, by running this command:

        yc metadata-hub connection-manager connection update trino <connection_ID> \
          --coordinator <coordinator_parameters>
        

        Where --coordinator stands for coordinator parameters in <host>:<port> format.

      • List of databases for all connections, except Trino, OpenSearch, and Apache Kafka® connections, by running this command:

        yc metadata-hub connection-manager connection update <database_type> <connection_ID> \
          --databases <database_list>
        

        Where --databases is a comma-separated list of databases.

        Make sure the user has the required access permissions.

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 relevant documentation on the Terraform website or its mirror.

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

Alert

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

You can update settings of a connection to a cluster with a managed database or to a custom database installation.

  1. To update settings of a connection to a cluster with a managed database:

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

    2. To update the description and labels for a connection, update the values of the relevant fields in the resource description:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        description = "<connection_description>"
      
        labels = {
          "<key_1>" = "<value_1>"
          "<key_2>" = "<value_2>"
          ...
          "<key_N>" = "<value_N>"
        }
        ...
      }
      

      Where:

      • description: Connection description.

      • --labels: Labels in "<key>" = "<value>" format.

    3. To update the cluster ID, update the managed_cluster_id field value under params.<database_type>:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            managed_cluster_id = "<cluster_ID>"
            ...
          }
        }
      }
      
    4. To update the list of databases for all connections, except Managed Service for OpenSearch and Managed Service for Apache Kafka® connections, update the databases field value under params.<database_type>:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            ...
            databases = [
              "<database_1>",
              "<database_2>",
              ...
              "<database_N>"
            ]
            ...
          }
        }
      }
      

      Where databases is the list of databases. Make sure the user has the required access permissions.

    5. To update authentication parameters for all connections, except Managed Service for Apache Kafka® connections, update the values in the user and password.raw fields under params.<database_type>.auth.user_password:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            ...
            auth = {
              user_password = {
                user     = "<username>"
                password = {
                  raw = "<password>"
                }
              }
            }
          }
        }
      }
      
    6. To update authentication parameters for Managed Service for Apache Kafka® connections, update the values of the fields under params.kafka.auth.sasl:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          kafka = {
            ...
            auth = {
              sasl = {
                user     = "<username>"
                password = { 
                  raw = "<password>"
                }
                supported_mechanisms = [
                  <list_of_authentication_mechanisms>
                ]
              }
            }
          }
        }
      }
      

      Where params.kafka.auth stands for authentication parameters. Select one of the sections:

      • sasl: SASL authentication parameters.

        • user: Username to connect to the cluster.

        • password.raw: Password.

        • supported_mechanisms: List of authentication mechanisms. The possible values are:

          • PLAIN: Authentication with login and password provided as plain unencrypted text.
          • SCRAM_SHA256: Authentication with SHA-256 hashing.
          • SCRAM_SHA512: Authentication with SHA-512 hashing.
      • disabled: Disables authentication.

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

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

  2. To update settings of a connection to a custom database installation:

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

    2. To update the description and labels for a connection, update the values of the relevant fields in the resource description:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        description = "<connection_description>"
      
        labels = {
          "<key_1>" = "<value_1>"
          "<key_2>" = "<value_2>"
          ...
          "<key_N>" = "<value_N>"
        }
        ...
      }
      

      Where:

      • description: Connection description.

      • --labels: Labels in "<key>" = "<value>" format.

    3. To update the list of hosts for all connections, except Trino connections, update the hosts field value under params.<database_type>.cluster:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            cluster = {
              hosts = [
                {
                  <host_1_parameters>
                },
                {
                  <host_2_parameters>
                },
                ...
                {
                  <host_N_parameters>
                }
              ]
              ...
            }
            ...
          }
        }
      }
      

      Warning

      Host parameters depend on the database type. For more information, see this Terraform provider guide.

    4. To update coordinator parameters for Trino connections, update the values of the host and port fields under params.trino.cluster.coordinator:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            cluster = {
              coordinator = {
                host = "<host>"
                port = <port>
              }
              ...
            }
            ...
          }
        }
      }
      
    5. To update TLS parameters, update the values of the fields under params.<database_type>.cluster.tls_params:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            cluster = {
              ...
              tls_params = {
                tls {
                  ca_certificate = "<path_to_certificate>"
                }
              }
            }
            ...
          }
        }
      }
      

      Where params.<database_type>.cluster.tls_params represents TLS parameters. Select one of the sections:

      • tls.ca_certificate: Path to your TLS CA certificate file.
      • disabled: Disables TLS. TLS is enabled by default.
    6. To update the list of databases for all connections, except Trino, OpenSearch, and Apache Kafka® connections, update the databases field value under params.<database_type>:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            ...
            databases = [
              "<database_1>",
              "<database_2>",
              ...
              "<database_N>"
            ]
            ...
          }
        }
      }
      

      Where databases is the list of databases. Make sure the user has the required access permissions.

    7. To update authentication parameters for all connections, except Apache Kafka® connections, update the values in the user and password.raw fields under params.<database_type>.auth.user_password:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          <database_type> = {
            ...
            auth = {
              user_password = {
                user     = "<username>"
                password = {
                  raw = "<password>"
                }
              }
            }
          }
        }
      }
      
    8. To update authentication parameters for Apache Kafka® connections, update the values of the fields under params.kafka.auth.sasl:

      resource "yandex_connectionmanager_connection" "<local_connection_name>" {
        ...
        params = {
          kafka = {
            ...
            auth = {
              sasl = {
                user     = "<username>"
                password = { 
                  raw = "<password>"
                }
                supported_mechanisms = [
                  <list_of_authentication_mechanisms>
                ]
              }
            }
          }
        }
      }
      

      Where params.kafka.auth stands for authentication parameters. Select one of the sections:

      • sasl: SASL authentication parameters.

        • user: Username to connect to the cluster.

        • password.raw: Password.

        • supported_mechanisms: List of authentication mechanisms. The possible values are:

          • PLAIN: Authentication with login and password provided as plain unencrypted text.
          • SCRAM_SHA256: Authentication with SHA-256 hashing.
          • SCRAM_SHA512: Authentication with SHA-512 hashing.
      • disabled: Disables authentication.

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

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

Use the Connection.Update REST API method or the ConnectionService.Update gRPC API call and provide the connection ID in the request.

You can get the connection ID with the list of connections in the folder.

Was the article helpful?

Previous
Creating a connection
Next
Configuring connection access permissions
© 2025 Direct Cursus Technology L.L.C.