Kafka

Pulumi Official
Package maintained by Pulumi
v3.2.0 published on Monday, Apr 4, 2022 by Pulumi

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.

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/v3/go/pulumi"
	kafka "github.com/pulumi/pulumi-kafka/sdk/v3/go/kafka"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		topic, err := kafka.NewTopic(ctx, "topic", &kafka.TopicArgs{
			Name:              pulumi.String("sample-topic"),
			ReplicationFactor: pulumi.Int(1),
			Partitions:        pulumi.Int(4),
		})
		if err != nil {
			return err
		}

		return nil
	})
}
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,
            });
        });
}