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

In this article:

  • Connecting to a cluster with a managed database
  • Managed Service for PostgreSQL
  • Managed Service for ClickHouse®
  • Managed Service for MySQL®
  • Yandex Managed Service for Valkey™
  • Managed Service for OpenSearch
  • Yandex StoreDoc
  • Managed Service for Apache Kafka®
  • Yandex MPP Analytics for PostgreSQL
  • Connecting to a custom database installation
  • PostgreSQL
  • ClickHouse®
  • MySQL®
  • Valkey™
  • Valkey™
  • Trino
  • OpenSearch
  • MongoDB
  • Apache Kafka®
  • Greenplum®
  1. Connection Manager
  2. Step-by-step guides
  3. Creating a connection

Creating a connection

Written by
Yandex Cloud
Updated at December 3, 2025
  • Connecting to a cluster with a managed database
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Managed Service for MySQL®
    • Yandex Managed Service for Valkey™
    • Managed Service for OpenSearch
    • Yandex StoreDoc
    • Managed Service for Apache Kafka®
    • Yandex MPP Analytics for PostgreSQL
  • Connecting to a custom database installation
    • PostgreSQL
    • ClickHouse®
    • MySQL®
    • Valkey™
    • Valkey™
    • Trino
    • OpenSearch
    • MongoDB
    • Apache Kafka®
    • Greenplum®

You can create connections of the following types:

  • To a cluster with a managed database:
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Managed Service for MySQL®
    • Yandex Managed Service for Valkey™
    • Managed Service for OpenSearch
    • Yandex StoreDoc
    • Managed Service for Apache Kafka®
    • Yandex MPP Analytics for PostgreSQL
  • To a custom database installation:
    • PostgreSQL
    • ClickHouse®
    • MySQL®
    • Valkey™
    • Valkey™
    • Trino
    • OpenSearch
    • MongoDB
    • Apache Kafka®
    • Greenplum®

Connecting to a cluster with a managed databaseConnecting to a cluster with a managed database

Managed Service for PostgreSQLManaged Service for PostgreSQL

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to PostgreSQL, select Managed Service for PostgreSQL cluster as the connection type and specify the cluster you need.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the cluster.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You can connect only to the databases that exist in the cluster. You must have access to them configured.
  11. Click Create.

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 create a connection to a Managed Service for PostgreSQL cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create postgresql --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create postgresql \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Managed Service for PostgreSQL cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        postgresql = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.postgresql: Parameters for connecting to the Managed Service for PostgreSQL cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Managed Service for PostgreSQL cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method on the Connection resource.

For more information about the available request parameters, see the REST API and gRPC API reference.

Managed Service for ClickHouse®Managed Service for ClickHouse®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to ClickHouse®, select Managed Service for ClickHouse® cluster as the connection type and specify the cluster you need.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the cluster.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a Managed Service for ClickHouse® cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create clickhouse --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create clickhouse \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Managed Service for ClickHouse® cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        clickhouse = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.clickhouse: Parameters for connecting to the Managed Service for ClickHouse® cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Managed Service for ClickHouse® cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Managed Service for MySQL®Managed Service for MySQL®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to MySQL®, select Managed Service for MySQL® cluster as the connection type and specify the cluster you need.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the cluster.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You can connect only to the databases that exist in the cluster. You must have access to them configured.
  11. Click Create.

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 create a connection to a Managed Service for MySQL® cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create mysql --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create mysql \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Managed Service for MySQL® cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        mysql = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.mysql: Parameters for connecting to the Managed Service for MySQL® cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Managed Service for MySQL® cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Yandex Managed Service for Valkey™Yandex Managed Service for Valkey™

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. From the Connection type list, select Valkey™.
  8. Under Connection to Valkey™, select Yandex Managed Service for Valkey™ cluster as the connection type and specify the cluster you need.
  9. Under Authentication, select how to set the password:
    • Enter manually: Enter the password manually.
    • Generate: Specify the options to generate a Lockbox password automatically.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a Yandex Managed Service for Valkey™ cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create valkey --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create valkey \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Yandex Managed Service for Valkey™ cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        valkey = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.valkey: Parameters for connecting to the Yandex Managed Service for Valkey™ cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Yandex Managed Service for Valkey™ cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Managed Service for OpenSearchManaged Service for OpenSearch

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to OpenSearch, select Managed Service for OpenSearch cluster as the connection type and specify the cluster you need.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the cluster.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You can connect only to the databases that exist in the cluster. You must have access to them configured.
  11. Click Create.

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 create a connection to a Managed Service for OpenSearch cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create opensearch --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create opensearch \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

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

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

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

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

To create a connection to a Managed Service for OpenSearch cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        opensearch = {
          managed_cluster_id = "<cluster_ID>"
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.opensearch: Parameters for connecting to the Managed Service for OpenSearch cluster:

      • managed_cluster_id: Cluster ID.

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

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Managed Service for OpenSearch cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Yandex StoreDocYandex StoreDoc

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to MongoDB, select Yandex StoreDoc cluster as the connection type and specify the cluster you need.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the cluster.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You can connect only to the databases that exist in the cluster. You must have access to them configured.
  11. Click Create.

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 create a connection to a Yandex StoreDoc cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create mongodb --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create mongodb \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Yandex StoreDoc cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        mongodb = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.mongodb: Parameters for connecting to the Yandex StoreDoc cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Yandex StoreDoc cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Managed Service for Apache Kafka®Managed Service for Apache Kafka®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to Apache Kafka®, select Managed Service for Kafka cluster as the connection type and specify the cluster you need.

  9. When using authentication:

    • Specify the Username for the connection.

    • Set a password in one of the following ways:

      • Enter manually: Enter the password in the input field.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
    • Optionally, in the Authentication mechanisms list, select the required options:

      • 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.
  10. Click Create.

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 create a connection to a Managed Service for Apache Kafka® cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create kafka --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create kafka \
      --name <connection_name> \
      --description "<connection_description>" \
      --supported-mechanisms <list_of_authentication_mechanisms> \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

    • --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.
    • --labels: Comma-separated list of labels in "<key>":"<value>" format.

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

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.

To create a connection to a Managed Service for Apache Kafka® cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        kafka = {
          managed_cluster_id = "<cluster_ID>"
    
          auth = {
            sasl = {
              user     = "<username>"
              password = { 
                raw = "<password>"
              }
              supported_mechanisms = [
                <list_of_authentication_mechanisms>
              ]
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.kafka: Parameters for connecting to the Managed Service for Apache Kafka® cluster:

      • managed_cluster_id: Cluster ID.

        You can get the cluster ID from the folder’s cluster list.

      • auth: 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.

  2. Check if 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.

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

To create a connection to a Managed Service for Apache Kafka® cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method on the Connection resource.

For more information about the available request parameters, see the REST API and gRPC API reference.

Yandex MPP Analytics for PostgreSQLYandex MPP Analytics for PostgreSQL

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to Greenplum, select Yandex MPP Analytics for PostgreSQL cluster as the connection type and specify the cluster you need.

  9. Under Authentication:

    1. Specify the Username for the connection.
    2. Select the password setting method:
      • Enter manually: Enter the password in the input field.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. List the databases whose connections you want to manage. You can connect only to the databases that exist in the cluster. Make sure the user has the required access permissions.

  11. Click Create.

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 create a connection to a Yandex MPP Analytics for PostgreSQL cluster, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create greenplum --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create greenplum \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --managed-cluster-id <cluster_ID> \
      --databases <database_list>
    

    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.

    • --managed-cluster-id: Cluster ID.

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

    • --databases: 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.

To create a connection to a Yandex MPP Analytics for PostgreSQL cluster, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        greenplum = {
          managed_cluster_id = "<cluster_ID>"
          
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.greenplum: Parameters for connecting to the Yandex MPP Analytics for PostgreSQL cluster:

      • managed_cluster_id: Cluster ID.

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

      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: Username to connect to the cluster.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Yandex MPP Analytics for PostgreSQL cluster, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method on the Connection resource.

For more information about the available request parameters, see the REST API and gRPC API reference.

Connecting to a custom database installationConnecting to a custom database installation

PostgreSQLPostgreSQL

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to PostgreSQL, specify the connection parameters:

    1. In the Connection type field, select Custom installation.

    2. In the Hosts field, specify the database host address and port number for the connection.

      When creating a connection to a custom database installation intended for Yandex DataLens, specify the host's external address.

    3. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.

  9. Under Authentication:

    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.

  11. Click Create.

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 create a connection to a custom PostgreSQL installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create postgresql --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create postgresql \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom PostgreSQL installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        postgresql = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.postgresql: Parameters for connecting to the custom PostgreSQL installation.

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a PostgreSQL custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

ClickHouse®ClickHouse®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to ClickHouse®, specify the connection parameters:
    1. In the Connection type field, select Custom installation.

    2. In the Hosts field, specify the FQDNs or IP addresses of the hosts in the shard, HTTP or TCP port for connection, and the shard name.

      When creating a connection to a custom database installation intended for Yandex DataLens, specify the hosts’ external IP addresses.

    3. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.

  9. Under Authentication:
    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a custom ClickHouse® installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create clickhouse --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create clickhouse \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<http_port>:<tcp_port>:<shard_name> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom ClickHouse® installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        clickhouse = {
          cluster = {
            hosts = [
              {
                host       = "<host_1>"
                http_port  = <http_port_1>
                shard_name = "<shard_1_name>"
                tcp_port   = <tcp_port_2>
              },
              {
                host       = "<host_2>"
                http_port  = <http_port_2>
                shard_name = "<shard_2_name>"
                tcp_port   = <tcp_port_2>
              },
              ...
              {
                host       = "<host_N>"
                http_port  = <http_port_N>
                shard_name = "<shard_N_name>"
                tcp_port   = <tcp_port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.clickhouse: Parameters for connecting to the custom ClickHouse® installation:

      • cluster.hosts: Host list. For each host, specify host, http_port, shard_name, and tcp_port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a ClickHouse® custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

MySQL®MySQL®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to MySQL®, specify the connection parameters:

    1. In the Connection type field, select Custom installation.

    2. In the Hosts field, specify the database host address and port number for the connection.

      When creating a connection to a custom database installation intended for Yandex DataLens, specify the host's external address.

    3. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.

  9. Under Authentication:

    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.

  11. Click Create.

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 create a connection to a custom MySQL® installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create mysql --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create mysql \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom MySQL® installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        mysql = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.mysql: Parameters for connecting to the custom MySQL® installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a MySQL® custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Valkey™Valkey™

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. From the Connection type list, select Valkey™.
  8. Under Connection to Valkey™, specify the connection parameters:
    1. In the Connection type field, select Custom installation.
    2. In the Hosts field, specify the FQDNs or IP addresses of the hosts in the shard, HTTP or TCP port for connection, and the shard name.
    3. Optionally, enable TLS.
  9. Under Authentication, specify a username and select how you want to set the password:
    • Enter manually: Enter the password manually.
    • Generate: Specify the options to generate a Lockbox password automatically.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a custom Valkey™ installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create redis --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create redis \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port>:<shard_name> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom Valkey™ installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        redis = {
          cluster = {
            hosts = [
              {
                host       = "<host_1>"
                port       = <port_1>
                shard_name = "<shard_1_name>"
              },
              {
                host       = "<host_2>"
                port       = <port_2>
                shard_name = "<shard_2_name>"
              },
              ...
              {
                host       = "<host_N>"
                port       = <port_N>
                shard_name = "<shard_N_name>"
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.redis: Parameters for connecting to the custom Valkey™ installation:

      • cluster.hosts: Host list. For each host, specify host, port, and shard_name.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Valkey™ custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Valkey™Valkey™

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. From the Connection type list, select Valkey™.
  8. Under Connection to Valkey™, specify the connection parameters:
    1. In the Connection type field, select Custom installation.

    2. In the Hosts field, specify the FQDNs or IP addresses of the hosts in the shard, HTTP or TCP port for connection, and the shard name.

      When creating a connection to a custom database installation intended for Yandex DataLens, specify the hosts’ external IP addresses.

    3. Optionally, enable TLS.

  9. Under Authentication, specify a username and select how you want to set the password:
    • Enter manually: Enter the password manually.
    • Generate: Specify the options to generate a Lockbox password automatically.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a custom Valkey™ installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create valkey --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create valkey \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom Valkey™ installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        valkey = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.valkey: Parameters for connecting to the custom Valkey™ installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Valkey™ custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

TrinoTrino

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to Trino, specify the connection parameters:
    1. In the Coordinator field, specify the coordinator host address and port number for the connection.
    2. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Click Create.

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 create a connection to a custom Trino installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create trino --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create trino \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --coordinator <coordinator_parameters> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --coordinator: Coordinator parameters in <host>:<port> format.

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

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

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.

To create a connection to a custom Trino installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        trino = {
          cluster = {
            coordinator = {
                host = "<host>"
                port = <port>
            }
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.trino: Parameters for connecting to the custom Trino installation:

      • cluster.coordinator: Coordinator parameters, host and port.

      • cluster.tls_params: 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.
      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a Trino custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

OpenSearchOpenSearch

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to OpenSearch, specify the connection parameters:
    1. In the Connection type field, select Custom installation.
    2. In the Hosts field, specify the database host address and port number for the connection.
    3. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a custom OpenSearch installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create opensearch --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create opensearch \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

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

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

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.

To create a connection to a custom OpenSearch installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        opensearch = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.opensearch: Parameters for connecting to the custom OpenSearch installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a OpenSearch custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

MongoDBMongoDB

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.
  2. Select Yandex MetaData Hub.
  3. In the left-hand panel, select Connection manager.
  4. Click Create connection.
  5. Specify the connection name.
  6. Optionally, add a description and label for the connection.
  7. Select Connection type.
  8. Under Connection to MongoDB, specify the connection parameters:
    1. In the Connection type field, select Custom installation.
    2. In the Hosts field, specify the database host address and port number for the connection.
    3. Optionally, enable TLS.
      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.
  9. Under Authentication:
    1. Specify the Username you will use to connect to the database.
    2. Select the password setting method:
      • Enter manually: You set the password manually.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. Optionally, list the databases whose connections you want to manage. You must have access to them configured.
  11. Click Create.

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 create a connection to a custom MongoDB installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create mongodb --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create mongodb \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom MongoDB installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        mongodb = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.mongodb: Parameters for connecting to the custom MongoDB installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a MongoDB custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Apache Kafka®Apache Kafka®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to Apache Kafka®, specify the connection parameters:

    • In the Connection type list, select Custom installation.

    • In the Hosts field, specify the host address and port for the connection.

    • Optionally, enable TLS.

      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.

  9. When using authentication:

    • Specify the Username for the connection.

    • Set a password in one of the following ways:

      • Enter manually: Enter the password in the input field.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
    • Optionally, in the Authentication mechanisms list, select the required options:

      • 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.
  10. Click Create.

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 create a connection to a custom Apache Kafka® installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create kafka --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create kafka \
      --name <connection_name> \
      --description "<connection_description>" \
      --supported-mechanisms <list_of_authentication_mechanisms> \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

    • --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.
    • --labels: Comma-separated list of labels in "<key>":"<value>" format.

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

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

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

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

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.

To create a connection to a custom Apache Kafka® installation, do the following:

  1. In the configuration file, describe the resource you are creating:

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        kafka = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          auth = {
            sasl = {
              user     = "<username>"
              password = { 
                raw = "<password>"
              }
              supported_mechanisms = [
                <list_of_authentication_mechanisms>
              ]
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.kafka: Parameters for connecting to the custom Apache Kafka® installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • auth: 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.

  2. Check if 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.

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

To create a connection to a Apache Kafka® custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

Greenplum®Greenplum®

Management console
CLI
Terraform
API
  1. In the management console, select the folder you want to create a connection in.

  2. Select Yandex MetaData Hub.

  3. In the left-hand panel, select Connection manager.

  4. Click Create connection.

  5. Specify the connection name.

  6. Optionally, add a description and label for the connection.

  7. Select Connection type.

  8. Under Connection to Greenplum, specify the connection parameters:

    1. In the Connection type field, select Custom installation.

    2. In the Hosts field, specify the database host address and port number for the connection.

      When creating a connection to a custom database installation intended for Yandex DataLens, specify the host's external address.

    3. Optionally, enable TLS.

      If your company has a certification authority (CA), the certificate issued by that CA will be used by default. If the company has no CA, upload the server's TLS certificate.

  9. Under Authentication:

    1. Specify the Username for the connection.
    2. Select the password setting method:
      • Enter manually: Enter the password in the input field.
      • Generate: Password will be generated automatically. You can configure Lockbox password generation rules or leave the default ones.
  10. List the databases whose connections you want to manage. Make sure the user has the required access permissions.

  11. Click Create.

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 create a connection to a custom Greenplum® installation, do the following:

  1. See the description of the CLI command for creating a connection:

    yc metadata-hub connection-manager connection create greenplum --help
    
  2. Create your connection by running this command:

    yc metadata-hub connection-manager connection create greenplum \
      --name <connection_name> \
      --description "<connection_description>" \
      --labels <label_list> \
      --user <username> \
      --password <password> \
      --hosts <list_of_hosts> \
      --databases <database_list> \
      --ca-certificate <path_to_certificate>
    

    Where:

    • --name: Connection name.

    • --description: Connection description.

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

    • --user: User name for connection to the database.

    • --password: Password.

    • --hosts: Comma-separated list of hosts in <host>:<port> format.

    • --databases: Comma-separated list of databases.

      Make sure the user has the required access permissions.

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

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

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.

To create a connection to a custom Greenplum® installation, do the following:

  1. In the configuration file, describe the resource you are creating.

    Here is the configuration file example:

    resource "yandex_connectionmanager_connection" "<local_connection_name>" {
      name        = "<connection_name>"
      description = "<connection_description>"
      
      labels = {
        "<key_1>" = "<value_1>"
        "<key_2>" = "<value_2>"
        ...
        "<key_N>" = "<value_N>"
      }
      
      params = {
        greenplum = {
          cluster = {
            hosts = [
              {
                host = "<host_1>"
                port = <port_1>
              },
              {
                host = "<host_2>"
                port = <port_2>
              },
              ...
              {
                host = "<host_N>"
                port = <port_N>
              }
            ]
            
            tls_params = {
              tls {
                ca_certificate = "<path_to_certificate>"
              }
            }
          }
    
          databases = [
            "<database_1>",
            "<database_2>",
            ...
            "<database_N>"
          ]
    
          auth = {
            user_password = {
              user     = "<username>"
              password = {
                raw = "<password>"
              }
            }
          }
        }
      }
    }
    

    Where:

    • name: Connection name.

    • description: Connection description.

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

    • params.greenplum: Parameters for connecting to the custom Greenplum® installation:

      • cluster.hosts: Host list. For each host, specify host and port.

      • cluster.tls_params: 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.
      • databases: List of databases. Make sure the user has the required access permissions.

      • auth.user_password.user: User name for connection to the database.

      • auth.user_password.password.raw: Password.

  2. Check if 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.

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

To create a connection to a MongoDB custom installation, use the Connection.Create REST API method or the ConnectionService.Create gRPC API method.

For more information about the available request parameters, see the REST API and gRPC API reference.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Viewing a connection
Next
Editing a connection
© 2025 Direct Cursus Technology L.L.C.