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
new KafkaTopic(name: string, args: KafkaTopicArgs, opts?: CustomResourceOptions);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
- Service
Name string Service to link the kafka topic to
- Topic
Name string Topic name
- Cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- Client
Timeout KafkaTopic Client Timeout Args Custom Terraform Client timeouts
- Minimum
In intSync Replicas Minimum required nodes in-sync replicas (ISR) to produce to a partition
- Retention
Bytes int Retention bytes
- Retention
Hours int 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.
- 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
- Service
Name string Service to link the kafka topic to
- Topic
Name string Topic name
- Cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- Client
Timeout KafkaTopic Client Timeout Custom Terraform Client timeouts
- Minimum
In intSync Replicas Minimum required nodes in-sync replicas (ISR) to produce to a partition
- Retention
Bytes int Retention bytes
- Retention
Hours int 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.
- 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
- service
Name string Service to link the kafka topic to
- topic
Name string Topic name
- cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- client
Timeout KafkaTopic Client Timeout Custom Terraform Client timeouts
- minimum
In numberSync Replicas Minimum required nodes in-sync replicas (ISR) to produce to a partition
- retention
Bytes number Retention bytes
- retention
Hours number Retention period (hours)
- termination
Protection 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[KafkaTopic Client Timeout] Custom Terraform Client timeouts
- minimum_
in_ floatsync_ replicas 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:
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): KafkaTopicstatic 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:
- Cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- Client
Timeout KafkaTopic Client Timeout Args Custom Terraform Client timeouts
- Minimum
In intSync Replicas 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
- Retention
Bytes int Retention bytes
- Retention
Hours int Retention period (hours)
- Service
Name string 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 string Topic name
- Cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- Client
Timeout KafkaTopic Client Timeout Custom Terraform Client timeouts
- Minimum
In intSync Replicas 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
- Retention
Bytes int Retention bytes
- Retention
Hours int Retention period (hours)
- Service
Name string 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 string Topic name
- cleanup
Policy string Topic cleanup policy. Allowed values: delete, compact
- client
Timeout KafkaTopic Client Timeout Custom Terraform Client timeouts
- minimum
In numberSync Replicas 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
- retention
Bytes number Retention bytes
- retention
Hours number Retention period (hours)
- service
Name string Service to link the kafka topic to
- termination
Protection 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.
- topic
Name string Topic name
- cleanup_
policy str Topic cleanup policy. Allowed values: delete, compact
- client_
timeout Dict[KafkaTopic Client Timeout] Custom Terraform Client timeouts
- minimum_
in_ floatsync_ replicas 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.