1. Packages
  2. Vultr
  3. API Docs
  4. DatabaseConnector
Vultr v2.27.1 published on Tuesday, Sep 30, 2025 by dirien

vultr.DatabaseConnector

Get Started
vultr logo
Vultr v2.27.1 published on Tuesday, Sep 30, 2025 by dirien

    Provides a Vultr database connector resource. This can be used to create, read, modify, and delete connectors for a managed database on your Vultr account. Note: The managed database must be configured with enable_kafka_connect = true.

    Example Usage

    Create a new database connector:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@ediri/vultr";
    
    const myDatabaseConnector = new vultr.DatabaseConnector("myDatabaseConnector", {
        databaseId: vultr_database.my_database.id,
        name: "my_database_connector",
        "class": "com.couchbase.connect.kafka.CouchbaseSinkConnector",
        topics: "my_database_topic",
        config: JSON.stringify({
            "couchbase.seed.nodes": "3",
            "couchbase.username": "some_username",
            "couchbase.password": "some_password",
        }),
    });
    
    import pulumi
    import ediri_vultr as vultr
    import json
    
    my_database_connector = vultr.DatabaseConnector("myDatabaseConnector",
        database_id=vultr_database["my_database"]["id"],
        name="my_database_connector",
        class_="com.couchbase.connect.kafka.CouchbaseSinkConnector",
        topics="my_database_topic",
        config=json.dumps({
            "couchbase.seed.nodes": "3",
            "couchbase.username": "some_username",
            "couchbase.password": "some_password",
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"couchbase.seed.nodes": "3",
    			"couchbase.username":   "some_username",
    			"couchbase.password":   "some_password",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = vultr.NewDatabaseConnector(ctx, "myDatabaseConnector", &vultr.DatabaseConnectorArgs{
    			DatabaseId: pulumi.Any(vultr_database.My_database.Id),
    			Name:       pulumi.String("my_database_connector"),
    			Class:      pulumi.String("com.couchbase.connect.kafka.CouchbaseSinkConnector"),
    			Topics:     pulumi.String("my_database_topic"),
    			Config:     pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Vultr = ediri.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myDatabaseConnector = new Vultr.DatabaseConnector("myDatabaseConnector", new()
        {
            DatabaseId = vultr_database.My_database.Id,
            Name = "my_database_connector",
            Class = "com.couchbase.connect.kafka.CouchbaseSinkConnector",
            Topics = "my_database_topic",
            Config = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["couchbase.seed.nodes"] = "3",
                ["couchbase.username"] = "some_username",
                ["couchbase.password"] = "some_password",
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.DatabaseConnector;
    import com.pulumi.vultr.DatabaseConnectorArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myDatabaseConnector = new DatabaseConnector("myDatabaseConnector", DatabaseConnectorArgs.builder()
                .databaseId(vultr_database.my_database().id())
                .name("my_database_connector")
                .class_("com.couchbase.connect.kafka.CouchbaseSinkConnector")
                .topics("my_database_topic")
                .config(serializeJson(
                    jsonObject(
                        jsonProperty("couchbase.seed.nodes", "3"),
                        jsonProperty("couchbase.username", "some_username"),
                        jsonProperty("couchbase.password", "some_password")
                    )))
                .build());
    
        }
    }
    
    resources:
      myDatabaseConnector:
        type: vultr:DatabaseConnector
        properties:
          databaseId: ${vultr_database.my_database.id}
          name: my_database_connector
          class: com.couchbase.connect.kafka.CouchbaseSinkConnector
          topics: my_database_topic
          config:
            fn::toJSON:
              couchbase.seed.nodes: '3'
              couchbase.username: some_username
              couchbase.password: some_password
    

    Create DatabaseConnector Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatabaseConnector(name: string, args: DatabaseConnectorArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseConnector(resource_name: str,
                          args: DatabaseConnectorArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseConnector(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          class_: Optional[str] = None,
                          database_id: Optional[str] = None,
                          name: Optional[str] = None,
                          topics: Optional[str] = None,
                          config: Optional[str] = None)
    func NewDatabaseConnector(ctx *Context, name string, args DatabaseConnectorArgs, opts ...ResourceOption) (*DatabaseConnector, error)
    public DatabaseConnector(string name, DatabaseConnectorArgs args, CustomResourceOptions? opts = null)
    public DatabaseConnector(String name, DatabaseConnectorArgs args)
    public DatabaseConnector(String name, DatabaseConnectorArgs args, CustomResourceOptions options)
    
    type: vultr:DatabaseConnector
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DatabaseConnectorArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DatabaseConnectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseConnectorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var databaseConnectorResource = new Vultr.DatabaseConnector("databaseConnectorResource", new()
    {
        Class = "string",
        DatabaseId = "string",
        Name = "string",
        Topics = "string",
        Config = "string",
    });
    
    example, err := vultr.NewDatabaseConnector(ctx, "databaseConnectorResource", &vultr.DatabaseConnectorArgs{
    	Class:      pulumi.String("string"),
    	DatabaseId: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	Topics:     pulumi.String("string"),
    	Config:     pulumi.String("string"),
    })
    
    var databaseConnectorResource = new DatabaseConnector("databaseConnectorResource", DatabaseConnectorArgs.builder()
        .class_("string")
        .databaseId("string")
        .name("string")
        .topics("string")
        .config("string")
        .build());
    
    database_connector_resource = vultr.DatabaseConnector("databaseConnectorResource",
        class_="string",
        database_id="string",
        name="string",
        topics="string",
        config="string")
    
    const databaseConnectorResource = new vultr.DatabaseConnector("databaseConnectorResource", {
        "class": "string",
        databaseId: "string",
        name: "string",
        topics: "string",
        config: "string",
    });
    
    type: vultr:DatabaseConnector
    properties:
        class: string
        config: string
        databaseId: string
        name: string
        topics: string
    

    DatabaseConnector Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DatabaseConnector resource accepts the following input properties:

    Class string
    The class for the new managed database connector.
    DatabaseId string
    The managed database ID you want to attach this connector to.
    Name string
    The name for the new managed database connector.
    Topics string
    A comma-separated list of topics to use with the new managed database connector.
    Config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    Class string
    The class for the new managed database connector.
    DatabaseId string
    The managed database ID you want to attach this connector to.
    Name string
    The name for the new managed database connector.
    Topics string
    A comma-separated list of topics to use with the new managed database connector.
    Config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    class_ String
    The class for the new managed database connector.
    databaseId String
    The managed database ID you want to attach this connector to.
    name String
    The name for the new managed database connector.
    topics String
    A comma-separated list of topics to use with the new managed database connector.
    config String
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    class string
    The class for the new managed database connector.
    databaseId string
    The managed database ID you want to attach this connector to.
    name string
    The name for the new managed database connector.
    topics string
    A comma-separated list of topics to use with the new managed database connector.
    config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    class_ str
    The class for the new managed database connector.
    database_id str
    The managed database ID you want to attach this connector to.
    name str
    The name for the new managed database connector.
    topics str
    A comma-separated list of topics to use with the new managed database connector.
    config str
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    class String
    The class for the new managed database connector.
    databaseId String
    The managed database ID you want to attach this connector to.
    name String
    The name for the new managed database connector.
    topics String
    A comma-separated list of topics to use with the new managed database connector.
    config String
    A JSON string containing the configuration properties you wish to use with the new managed database connector.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseConnector resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DatabaseConnector Resource

    Get an existing DatabaseConnector resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DatabaseConnectorState, opts?: CustomResourceOptions): DatabaseConnector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            class_: Optional[str] = None,
            config: Optional[str] = None,
            database_id: Optional[str] = None,
            name: Optional[str] = None,
            topics: Optional[str] = None) -> DatabaseConnector
    func GetDatabaseConnector(ctx *Context, name string, id IDInput, state *DatabaseConnectorState, opts ...ResourceOption) (*DatabaseConnector, error)
    public static DatabaseConnector Get(string name, Input<string> id, DatabaseConnectorState? state, CustomResourceOptions? opts = null)
    public static DatabaseConnector get(String name, Output<String> id, DatabaseConnectorState state, CustomResourceOptions options)
    resources:  _:    type: vultr:DatabaseConnector    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Class string
    The class for the new managed database connector.
    Config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    DatabaseId string
    The managed database ID you want to attach this connector to.
    Name string
    The name for the new managed database connector.
    Topics string
    A comma-separated list of topics to use with the new managed database connector.
    Class string
    The class for the new managed database connector.
    Config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    DatabaseId string
    The managed database ID you want to attach this connector to.
    Name string
    The name for the new managed database connector.
    Topics string
    A comma-separated list of topics to use with the new managed database connector.
    class_ String
    The class for the new managed database connector.
    config String
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    databaseId String
    The managed database ID you want to attach this connector to.
    name String
    The name for the new managed database connector.
    topics String
    A comma-separated list of topics to use with the new managed database connector.
    class string
    The class for the new managed database connector.
    config string
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    databaseId string
    The managed database ID you want to attach this connector to.
    name string
    The name for the new managed database connector.
    topics string
    A comma-separated list of topics to use with the new managed database connector.
    class_ str
    The class for the new managed database connector.
    config str
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    database_id str
    The managed database ID you want to attach this connector to.
    name str
    The name for the new managed database connector.
    topics str
    A comma-separated list of topics to use with the new managed database connector.
    class String
    The class for the new managed database connector.
    config String
    A JSON string containing the configuration properties you wish to use with the new managed database connector.
    databaseId String
    The managed database ID you want to attach this connector to.
    name String
    The name for the new managed database connector.
    topics String
    A comma-separated list of topics to use with the new managed database connector.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.27.1 published on Tuesday, Sep 30, 2025 by dirien
      Meet Neo: Your AI Platform Teammate