Kafka

The Kafka provider for Pulumi can be used to provision any of the resources available for Kafka. The Kafka provider must be configured with credentials to deploy and update resources in Kafka.

See the full API documentation for complete details of the available Kafka provider APIs.

Setup

The Kafka provider supports several options for providing access to Kafka credentials. See the Kafka setup page for details.

Example

const kafka = require("@pulumi/kafka")

const topic = new kafka.Topic("topic", {
  name: "sample-topic",
  replicationFactor: 1,
  partitions: 4,
});
import * as kafka from "@pulumi/kafka";

const topic = new kafka.Topic("topic", {
  name: "sample-topic",
  replicationFactor: 1,
  partitions: 4,
});
import pulumi_kafka as kafka

topic = kafka.Topic("topic",
  name="sample-topic",
  replication_factor=1,
  partitions=4,
)
import (
  "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
  kafka "github.com/pulumi/pulumi-kafka/sdk/v2/go/kafka"
)

topic, _ := kafka.NewTopic(ctx, "topic", &kafka.TopicArgs{
  Name:              pulumi.String("sample-topic"),
  ReplicationFactor: pulumi.Int(1),
  Partitions:        pulumi.Int(4),
})
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Kafka;

class Program
{
    static Task Main() =>
        Deployment.Run(() => {
            var topic = new Topic("topic", new TopicArgs
            {
                Name = "sample-topic",
                ReplicationFactor = 1,
                Partitions = 4,
            });
        });
}

Libraries

The following packages are available in packager managers:

The Kafka provider is open source and available in the pulumi/pulumi-kafka repo.