aiven.KafkaConnector
Explore with Pulumi AI
The Kafka connectors resource allows the creation and management of Aiven Kafka connectors.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var kafka_os_con1 = new Aiven.KafkaConnector("kafka-os-con1", new()
{
Project = aiven_project.Kafka_con_project1.Project,
ServiceName = aiven_kafka.Kafka_service1.Service_name,
ConnectorName = "kafka-os-con1",
Config =
{
{ "topics", aiven_kafka_topic.Kafka_topic1.Topic_name },
{ "connector.class", "io.aiven.kafka.connect.opensearch.OpensearchSinkConnector" },
{ "type.name", "os-connector" },
{ "name", "kafka-os-con1" },
{ "connection.url", aiven_elasticsearch.Os_service1.Service_uri },
{ "connection.username", aiven_opensearch.Os_service1.Service_username },
{ "connection.password", aiven_opensearch.Os_service1.Service_password },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.NewKafkaConnector(ctx, "kafka-os-con1", &aiven.KafkaConnectorArgs{
Project: pulumi.Any(aiven_project.KafkaConProject1.Project),
ServiceName: pulumi.Any(aiven_kafka.KafkaService1.Service_name),
ConnectorName: pulumi.String("kafka-os-con1"),
Config: pulumi.StringMap{
"topics": pulumi.Any(aiven_kafka_topic.KafkaTopic1.Topic_name),
"connector.class": pulumi.String("io.aiven.kafka.connect.opensearch.OpensearchSinkConnector"),
"type.name": pulumi.String("os-connector"),
"name": pulumi.String("kafka-os-con1"),
"connection.url": pulumi.Any(aiven_elasticsearch.OsService1.Service_uri),
"connection.username": pulumi.Any(aiven_opensearch.OsService1.Service_username),
"connection.password": pulumi.Any(aiven_opensearch.OsService1.Service_password),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.KafkaConnector;
import com.pulumi.aiven.KafkaConnectorArgs;
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 kafka_os_con1 = new KafkaConnector("kafka-os-con1", KafkaConnectorArgs.builder()
.project(aiven_project.kafka-con-project1().project())
.serviceName(aiven_kafka.kafka-service1().service_name())
.connectorName("kafka-os-con1")
.config(Map.ofEntries(
Map.entry("topics", aiven_kafka_topic.kafka-topic1().topic_name()),
Map.entry("connector.class", "io.aiven.kafka.connect.opensearch.OpensearchSinkConnector"),
Map.entry("type.name", "os-connector"),
Map.entry("name", "kafka-os-con1"),
Map.entry("connection.url", aiven_elasticsearch.os-service1().service_uri()),
Map.entry("connection.username", aiven_opensearch.os-service1().service_username()),
Map.entry("connection.password", aiven_opensearch.os-service1().service_password())
))
.build());
}
}
import pulumi
import pulumi_aiven as aiven
kafka_os_con1 = aiven.KafkaConnector("kafka-os-con1",
project=aiven_project["kafka-con-project1"]["project"],
service_name=aiven_kafka["kafka-service1"]["service_name"],
connector_name="kafka-os-con1",
config={
"topics": aiven_kafka_topic["kafka-topic1"]["topic_name"],
"connector.class": "io.aiven.kafka.connect.opensearch.OpensearchSinkConnector",
"type.name": "os-connector",
"name": "kafka-os-con1",
"connection.url": aiven_elasticsearch["os-service1"]["service_uri"],
"connection.username": aiven_opensearch["os-service1"]["service_username"],
"connection.password": aiven_opensearch["os-service1"]["service_password"],
})
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const kafka_os_con1 = new aiven.KafkaConnector("kafka-os-con1", {
project: aiven_project["kafka-con-project1"].project,
serviceName: aiven_kafka["kafka-service1"].service_name,
connectorName: "kafka-os-con1",
config: {
topics: aiven_kafka_topic["kafka-topic1"].topic_name,
"connector.class": "io.aiven.kafka.connect.opensearch.OpensearchSinkConnector",
"type.name": "os-connector",
name: "kafka-os-con1",
"connection.url": aiven_elasticsearch["os-service1"].service_uri,
"connection.username": aiven_opensearch["os-service1"].service_username,
"connection.password": aiven_opensearch["os-service1"].service_password,
},
});
resources:
kafka-os-con1:
type: aiven:KafkaConnector
properties:
project: ${aiven_project"kafka-con-project1"[%!s(MISSING)].project}
serviceName: ${aiven_kafka"kafka-service1"[%!s(MISSING)].service_name}
connectorName: kafka-os-con1
config:
topics: ${aiven_kafka_topic"kafka-topic1"[%!s(MISSING)].topic_name}
connector.class: io.aiven.kafka.connect.opensearch.OpensearchSinkConnector
type.name: os-connector
name: kafka-os-con1
connection.url: ${aiven_elasticsearch"os-service1"[%!s(MISSING)].service_uri}
connection.username: ${aiven_opensearch"os-service1"[%!s(MISSING)].service_username}
connection.password: ${aiven_opensearch"os-service1"[%!s(MISSING)].service_password}
Create KafkaConnector Resource
new KafkaConnector(name: string, args: KafkaConnectorArgs, opts?: CustomResourceOptions);
@overload
def KafkaConnector(resource_name: str,
opts: Optional[ResourceOptions] = None,
config: Optional[Mapping[str, str]] = None,
connector_name: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None)
@overload
def KafkaConnector(resource_name: str,
args: KafkaConnectorArgs,
opts: Optional[ResourceOptions] = None)
func NewKafkaConnector(ctx *Context, name string, args KafkaConnectorArgs, opts ...ResourceOption) (*KafkaConnector, error)
public KafkaConnector(string name, KafkaConnectorArgs args, CustomResourceOptions? opts = null)
public KafkaConnector(String name, KafkaConnectorArgs args)
public KafkaConnector(String name, KafkaConnectorArgs args, CustomResourceOptions options)
type: aiven:KafkaConnector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KafkaConnectorArgs
- 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 KafkaConnectorArgs
- 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 KafkaConnectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KafkaConnectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KafkaConnectorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KafkaConnector Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The KafkaConnector resource accepts the following input properties:
- Config Dictionary<string, string>
The Kafka Connector configuration parameters.
- Connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- Project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Config map[string]string
The Kafka Connector configuration parameters.
- Connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- Project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- config Map<String,String>
The Kafka Connector configuration parameters.
- connector
Name String The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- config {[key: string]: string}
The Kafka Connector configuration parameters.
- connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- config Mapping[str, str]
The Kafka Connector configuration parameters.
- connector_
name str The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- project str
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- config Map<String>
The Kafka Connector configuration parameters.
- connector
Name String The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the KafkaConnector resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- string
The Kafka connector author.
- Plugin
Class string The Kafka connector Java class.
- Plugin
Doc stringUrl The Kafka connector documentation URL.
- Plugin
Title string The Kafka connector title.
- Plugin
Type string The Kafka connector type.
- Plugin
Version string The version of the kafka connector.
- Tasks
List<Kafka
Connector Task> List of tasks of a connector.
- Id string
The provider-assigned unique ID for this managed resource.
- string
The Kafka connector author.
- Plugin
Class string The Kafka connector Java class.
- Plugin
Doc stringUrl The Kafka connector documentation URL.
- Plugin
Title string The Kafka connector title.
- Plugin
Type string The Kafka connector type.
- Plugin
Version string The version of the kafka connector.
- Tasks
[]Kafka
Connector Task List of tasks of a connector.
- id String
The provider-assigned unique ID for this managed resource.
- String
The Kafka connector author.
- plugin
Class String The Kafka connector Java class.
- plugin
Doc StringUrl The Kafka connector documentation URL.
- plugin
Title String The Kafka connector title.
- plugin
Type String The Kafka connector type.
- plugin
Version String The version of the kafka connector.
- tasks
List<Kafka
Connector Task> List of tasks of a connector.
- id string
The provider-assigned unique ID for this managed resource.
- string
The Kafka connector author.
- plugin
Class string The Kafka connector Java class.
- plugin
Doc stringUrl The Kafka connector documentation URL.
- plugin
Title string The Kafka connector title.
- plugin
Type string The Kafka connector type.
- plugin
Version string The version of the kafka connector.
- tasks
Kafka
Connector Task[] List of tasks of a connector.
- id str
The provider-assigned unique ID for this managed resource.
- str
The Kafka connector author.
- plugin_
class str The Kafka connector Java class.
- plugin_
doc_ strurl The Kafka connector documentation URL.
- plugin_
title str The Kafka connector title.
- plugin_
type str The Kafka connector type.
- plugin_
version str The version of the kafka connector.
- tasks
Sequence[Kafka
Connector Task] List of tasks of a connector.
- id String
The provider-assigned unique ID for this managed resource.
- String
The Kafka connector author.
- plugin
Class String The Kafka connector Java class.
- plugin
Doc StringUrl The Kafka connector documentation URL.
- plugin
Title String The Kafka connector title.
- plugin
Type String The Kafka connector type.
- plugin
Version String The version of the kafka connector.
- tasks List<Property Map>
List of tasks of a connector.
Look up Existing KafkaConnector Resource
Get an existing KafkaConnector 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?: KafkaConnectorState, opts?: CustomResourceOptions): KafkaConnector
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config: Optional[Mapping[str, str]] = None,
connector_name: Optional[str] = None,
plugin_author: Optional[str] = None,
plugin_class: Optional[str] = None,
plugin_doc_url: Optional[str] = None,
plugin_title: Optional[str] = None,
plugin_type: Optional[str] = None,
plugin_version: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
tasks: Optional[Sequence[KafkaConnectorTaskArgs]] = None) -> KafkaConnector
func GetKafkaConnector(ctx *Context, name string, id IDInput, state *KafkaConnectorState, opts ...ResourceOption) (*KafkaConnector, error)
public static KafkaConnector Get(string name, Input<string> id, KafkaConnectorState? state, CustomResourceOptions? opts = null)
public static KafkaConnector get(String name, Output<String> id, KafkaConnectorState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Config Dictionary<string, string>
The Kafka Connector configuration parameters.
- Connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- string
The Kafka connector author.
- Plugin
Class string The Kafka connector Java class.
- Plugin
Doc stringUrl The Kafka connector documentation URL.
- Plugin
Title string The Kafka connector title.
- Plugin
Type string The Kafka connector type.
- Plugin
Version string The version of the kafka connector.
- Project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Tasks
List<Kafka
Connector Task> List of tasks of a connector.
- Config map[string]string
The Kafka Connector configuration parameters.
- Connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- string
The Kafka connector author.
- Plugin
Class string The Kafka connector Java class.
- Plugin
Doc stringUrl The Kafka connector documentation URL.
- Plugin
Title string The Kafka connector title.
- Plugin
Type string The Kafka connector type.
- Plugin
Version string The version of the kafka connector.
- Project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Tasks
[]Kafka
Connector Task Args List of tasks of a connector.
- config Map<String,String>
The Kafka Connector configuration parameters.
- connector
Name String The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- String
The Kafka connector author.
- plugin
Class String The Kafka connector Java class.
- plugin
Doc StringUrl The Kafka connector documentation URL.
- plugin
Title String The Kafka connector title.
- plugin
Type String The Kafka connector type.
- plugin
Version String The version of the kafka connector.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- tasks
List<Kafka
Connector Task> List of tasks of a connector.
- config {[key: string]: string}
The Kafka Connector configuration parameters.
- connector
Name string The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- string
The Kafka connector author.
- plugin
Class string The Kafka connector Java class.
- plugin
Doc stringUrl The Kafka connector documentation URL.
- plugin
Title string The Kafka connector title.
- plugin
Type string The Kafka connector type.
- plugin
Version string The version of the kafka connector.
- project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- tasks
Kafka
Connector Task[] List of tasks of a connector.
- config Mapping[str, str]
The Kafka Connector configuration parameters.
- connector_
name str The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- str
The Kafka connector author.
- plugin_
class str The Kafka connector Java class.
- plugin_
doc_ strurl The Kafka connector documentation URL.
- plugin_
title str The Kafka connector title.
- plugin_
type str The Kafka connector type.
- plugin_
version str The version of the kafka connector.
- project str
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- tasks
Sequence[Kafka
Connector Task Args] List of tasks of a connector.
- config Map<String>
The Kafka Connector configuration parameters.
- connector
Name String The kafka connector name. This property cannot be changed, doing so forces recreation of the resource.
- String
The Kafka connector author.
- plugin
Class String The Kafka connector Java class.
- plugin
Doc StringUrl The Kafka connector documentation URL.
- plugin
Title String The Kafka connector title.
- plugin
Type String The Kafka connector type.
- plugin
Version String The version of the kafka connector.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- tasks List<Property Map>
List of tasks of a connector.
Supporting Types
KafkaConnectorTask, KafkaConnectorTaskArgs
Import
$ pulumi import aiven:index/kafkaConnector:KafkaConnector kafka-os-con1 project/service_name/connector_name
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aiven
Terraform Provider.