KafkaTopic

Example Usage

using Pulumi;
using Aiven = Pulumi.Aiven;

class MyStack : Stack
{
    public MyStack()
    {
        var mytesttopic = new Aiven.KafkaTopic("mytesttopic", new Aiven.KafkaTopicArgs
        {
            CleanupPolicy = "delete",
            MinimumInSyncReplicas = 2,
            Partitions = 5,
            Project = aiven_project.Myproject.Project,
            Replication = 3,
            RetentionBytes = -1,
            RetentionHours = 72,
            ServiceName = aiven_service.Myservice.Service_name,
            TopicName = "<TOPIC_NAME>",
        });
    }

}

Coming soon!

import pulumi
import pulumi_aiven as aiven

mytesttopic = aiven.KafkaTopic("mytesttopic",
    cleanup_policy="delete",
    minimum_in_sync_replicas=2,
    partitions=5,
    project=aiven_project["myproject"]["project"],
    replication=3,
    retention_bytes=-1,
    retention_hours=72,
    service_name=aiven_service["myservice"]["service_name"],
    topic_name="<TOPIC_NAME>")
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const mytesttopic = new aiven.KafkaTopic("mytesttopic", {
    cleanupPolicy: "delete",
    minimumInSyncReplicas: 2,
    partitions: 5,
    project: aiven_project_myproject.project,
    replication: 3,
    retentionBytes: -1,
    retentionHours: 72,
    serviceName: aiven_service_myservice.serviceName,
    topicName: "<TOPIC_NAME>",
});

Create a KafkaTopic Resource

def KafkaTopic(resource_name, opts=None, cleanup_policy=None, client_timeout=None, minimum_in_sync_replicas=None, partitions=None, project=None, replication=None, retention_bytes=None, retention_hours=None, service_name=None, termination_protection=None, topic_name=None, __props__=None);
func NewKafkaTopic(ctx *Context, name string, args KafkaTopicArgs, opts ...ResourceOption) (*KafkaTopic, error)
public KafkaTopic(string name, KafkaTopicArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args KafkaTopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KafkaTopicArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KafkaTopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

KafkaTopic Resource Properties

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

Inputs

The KafkaTopic resource accepts the following input properties:

Partitions int

Number of partitions to create in the topic

Project string

Project to link the kafka topic to

Replication int

Replication factor for the topic

ServiceName string

Service to link the kafka topic to

TopicName string

Topic name

CleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

ClientTimeout KafkaTopicClientTimeoutArgs

Custom Terraform Client timeouts

Deprecated: use timeouts instead

MinimumInSyncReplicas int

Minimum required nodes in-sync replicas (ISR) to produce to a partition

RetentionBytes int

Retention bytes

RetentionHours int

Retention period (hours)

TerminationProtection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

Partitions int

Number of partitions to create in the topic

Project string

Project to link the kafka topic to

Replication int

Replication factor for the topic

ServiceName string

Service to link the kafka topic to

TopicName string

Topic name

CleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

ClientTimeout KafkaTopicClientTimeout

Custom Terraform Client timeouts

Deprecated: use timeouts instead

MinimumInSyncReplicas int

Minimum required nodes in-sync replicas (ISR) to produce to a partition

RetentionBytes int

Retention bytes

RetentionHours int

Retention period (hours)

TerminationProtection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

partitions number

Number of partitions to create in the topic

project string

Project to link the kafka topic to

replication number

Replication factor for the topic

serviceName string

Service to link the kafka topic to

topicName string

Topic name

cleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

clientTimeout KafkaTopicClientTimeout

Custom Terraform Client timeouts

Deprecated: use timeouts instead

minimumInSyncReplicas number

Minimum required nodes in-sync replicas (ISR) to produce to a partition

retentionBytes number

Retention bytes

retentionHours number

Retention period (hours)

terminationProtection boolean

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

partitions float

Number of partitions to create in the topic

project str

Project to link the kafka topic to

replication float

Replication factor for the topic

service_name str

Service to link the kafka topic to

topic_name str

Topic name

cleanup_policy str

Topic cleanup policy. Allowed values: delete, compact

client_timeout Dict[KafkaTopicClientTimeout]

Custom Terraform Client timeouts

Deprecated: use timeouts instead

minimum_in_sync_replicas float

Minimum required nodes in-sync replicas (ISR) to produce to a partition

retention_bytes float

Retention bytes

retention_hours float

Retention period (hours)

termination_protection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

Outputs

All input properties are implicitly available as output properties. Additionally, the KafkaTopic 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing KafkaTopic Resource

Get an existing KafkaTopic 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?: KafkaTopicState, opts?: CustomResourceOptions): KafkaTopic
static get(resource_name, id, opts=None, cleanup_policy=None, client_timeout=None, minimum_in_sync_replicas=None, partitions=None, project=None, replication=None, retention_bytes=None, retention_hours=None, service_name=None, termination_protection=None, topic_name=None, __props__=None);
func GetKafkaTopic(ctx *Context, name string, id IDInput, state *KafkaTopicState, opts ...ResourceOption) (*KafkaTopic, error)
public static KafkaTopic Get(string name, Input<string> id, KafkaTopicState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

ClientTimeout KafkaTopicClientTimeoutArgs

Custom Terraform Client timeouts

Deprecated: use timeouts instead

MinimumInSyncReplicas int

Minimum required nodes in-sync replicas (ISR) to produce to a partition

Partitions int

Number of partitions to create in the topic

Project string

Project to link the kafka topic to

Replication int

Replication factor for the topic

RetentionBytes int

Retention bytes

RetentionHours int

Retention period (hours)

ServiceName string

Service to link the kafka topic to

TerminationProtection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

TopicName string

Topic name

CleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

ClientTimeout KafkaTopicClientTimeout

Custom Terraform Client timeouts

Deprecated: use timeouts instead

MinimumInSyncReplicas int

Minimum required nodes in-sync replicas (ISR) to produce to a partition

Partitions int

Number of partitions to create in the topic

Project string

Project to link the kafka topic to

Replication int

Replication factor for the topic

RetentionBytes int

Retention bytes

RetentionHours int

Retention period (hours)

ServiceName string

Service to link the kafka topic to

TerminationProtection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

TopicName string

Topic name

cleanupPolicy string

Topic cleanup policy. Allowed values: delete, compact

clientTimeout KafkaTopicClientTimeout

Custom Terraform Client timeouts

Deprecated: use timeouts instead

minimumInSyncReplicas number

Minimum required nodes in-sync replicas (ISR) to produce to a partition

partitions number

Number of partitions to create in the topic

project string

Project to link the kafka topic to

replication number

Replication factor for the topic

retentionBytes number

Retention bytes

retentionHours number

Retention period (hours)

serviceName string

Service to link the kafka topic to

terminationProtection boolean

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

topicName string

Topic name

cleanup_policy str

Topic cleanup policy. Allowed values: delete, compact

client_timeout Dict[KafkaTopicClientTimeout]

Custom Terraform Client timeouts

Deprecated: use timeouts instead

minimum_in_sync_replicas float

Minimum required nodes in-sync replicas (ISR) to produce to a partition

partitions float

Number of partitions to create in the topic

project str

Project to link the kafka topic to

replication float

Replication factor for the topic

retention_bytes float

Retention bytes

retention_hours float

Retention period (hours)

service_name str

Service to link the kafka topic to

termination_protection bool

It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.

topic_name str

Topic name

Supporting Types

KafkaTopicClientTimeout

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Create string
Read string
Create string
Read string
create string
read string
create str
read str

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.