Viewing docs for Aiven v4.5.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for Aiven v4.5.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
The Kafka Topic data source provides information about the existing Aiven Kafka Topic.
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var mytesttopic = Output.Create(Aiven.GetKafkaTopic.InvokeAsync(new Aiven.GetKafkaTopicArgs
{
Project = aiven_project.Myproject.Project,
ServiceName = aiven_service.Myservice.Service_name,
TopicName = "<TOPIC_NAME>",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v4/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.LookupKafkaTopic(ctx, &GetKafkaTopicArgs{
Project: aiven_project.Myproject.Project,
ServiceName: aiven_service.Myservice.Service_name,
TopicName: "<TOPIC_NAME>",
}, nil)
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const mytesttopic = aiven.getKafkaTopic({
project: aiven_project.myproject.project,
serviceName: aiven_service.myservice.service_name,
topicName: "<TOPIC_NAME>",
});
import pulumi
import pulumi_aiven as aiven
mytesttopic = aiven.get_kafka_topic(project=aiven_project["myproject"]["project"],
service_name=aiven_service["myservice"]["service_name"],
topic_name="<TOPIC_NAME>")
Example coming soon!
Using getKafkaTopic
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getKafkaTopic(args: GetKafkaTopicArgs, opts?: InvokeOptions): Promise<GetKafkaTopicResult>
function getKafkaTopicOutput(args: GetKafkaTopicOutputArgs, opts?: InvokeOptions): Output<GetKafkaTopicResult>def get_kafka_topic(project: Optional[str] = None,
service_name: Optional[str] = None,
topic_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKafkaTopicResult
def get_kafka_topic_output(project: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
topic_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKafkaTopicResult]func LookupKafkaTopic(ctx *Context, args *LookupKafkaTopicArgs, opts ...InvokeOption) (*LookupKafkaTopicResult, error)
func LookupKafkaTopicOutput(ctx *Context, args *LookupKafkaTopicOutputArgs, opts ...InvokeOption) LookupKafkaTopicResultOutput> Note: This function is named LookupKafkaTopic in the Go SDK.
public static class GetKafkaTopic
{
public static Task<GetKafkaTopicResult> InvokeAsync(GetKafkaTopicArgs args, InvokeOptions? opts = null)
public static Output<GetKafkaTopicResult> Invoke(GetKafkaTopicInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKafkaTopicResult> getKafkaTopic(GetKafkaTopicArgs args, InvokeOptions options)
public static Output<GetKafkaTopicResult> getKafkaTopic(GetKafkaTopicArgs args, InvokeOptions options)
fn::invoke:
function: aiven:index/getKafkaTopic:getKafkaTopic
arguments:
# arguments dictionaryThe following arguments are supported:
- 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.
- Topic
Name string - The name of the topic. 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.
- Topic
Name string - The name of the topic. 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.
- topic
Name String - The name of the topic. 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.
- topic
Name string - The name of the topic. 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.
- topic_
name str - The name of the topic. 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.
- topic
Name String - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
getKafkaTopic Result
The following output properties are available:
- Cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - Configs
List<Get
Kafka Topic Config> - Kafka topic configuration
- Id string
- The provider-assigned unique ID for this managed resource.
- Minimum
In intSync Replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- Partitions int
- The number of partitions to create in the topic.
- 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.
- Replication int
- The replication factor for the topic.
- Retention
Bytes int - DEPRECATED use config.retention_bytes instead Retention bytes.
- Retention
Hours int - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
-
List<Get
Kafka Topic Tag> - Kafka Topic tag.
- Termination
Protection bool - Topic
Name string - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- Cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - Configs
[]Get
Kafka Topic Config - Kafka topic configuration
- Id string
- The provider-assigned unique ID for this managed resource.
- Minimum
In intSync Replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- Partitions int
- The number of partitions to create in the topic.
- 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.
- Replication int
- The replication factor for the topic.
- Retention
Bytes int - DEPRECATED use config.retention_bytes instead Retention bytes.
- Retention
Hours int - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
-
[]Get
Kafka Topic Tag - Kafka Topic tag.
- Termination
Protection bool - Topic
Name string - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- cleanup
Policy String - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - configs
List<Get
Kafka Topic Config> - Kafka topic configuration
- id String
- The provider-assigned unique ID for this managed resource.
- minimum
In IntegerSync Replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- partitions Integer
- The number of partitions to create in the topic.
- 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.
- replication Integer
- The replication factor for the topic.
- retention
Bytes Integer - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Hours Integer - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
-
List<Get
Kafka Topic Tag> - Kafka Topic tag.
- termination
Protection Boolean - topic
Name String - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - configs
Get
Kafka Topic Config[] - Kafka topic configuration
- id string
- The provider-assigned unique ID for this managed resource.
- minimum
In numberSync Replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- partitions number
- The number of partitions to create in the topic.
- 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.
- replication number
- The replication factor for the topic.
- retention
Bytes number - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Hours number - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
-
Get
Kafka Topic Tag[] - Kafka Topic tag.
- termination
Protection boolean - topic
Name string - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- cleanup_
policy str - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - configs
Sequence[Get
Kafka Topic Config] - Kafka topic configuration
- id str
- The provider-assigned unique ID for this managed resource.
- minimum_
in_ intsync_ replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- partitions int
- The number of partitions to create in the topic.
- 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.
- replication int
- The replication factor for the topic.
- retention_
bytes int - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention_
hours int - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
-
Sequence[Get
Kafka Topic Tag] - Kafka Topic tag.
- termination_
protection bool - topic_
name str - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- cleanup
Policy String - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - configs List<Property Map>
- Kafka topic configuration
- id String
- The provider-assigned unique ID for this managed resource.
- minimum
In NumberSync Replicas - DEPRECATED use config.mininsyncreplicas instead Minimum required nodes in-sync replicas (ISR) to produce to a partition.
- partitions Number
- The number of partitions to create in the topic.
- 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.
- replication Number
- The replication factor for the topic.
- retention
Bytes Number - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Hours Number - DEPRECATED use config.retention_ms instead Retention period (hours).
- 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.
- List<Property Map>
- Kafka Topic tag.
- termination
Protection Boolean - topic
Name String - The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
Supporting Types
GetKafkaTopicConfig
- Cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - Compression
Type string - Delete
Retention stringMs - File
Delete stringDelay Ms - Flush
Messages string - Flush
Ms string - Index
Interval stringBytes - Max
Compaction stringLag Ms - Max
Message stringBytes - Message
Downconversion stringEnable - Message
Format stringVersion - Message
Timestamp stringDifference Max Ms - Message
Timestamp stringType - Min
Cleanable stringDirty Ratio - Min
Compaction stringLag Ms - Min
Insync stringReplicas - Preallocate string
- Retention
Bytes string - DEPRECATED use config.retention_bytes instead Retention bytes.
- Retention
Ms string - Segment
Bytes string - Segment
Index stringBytes - Segment
Jitter stringMs - Segment
Ms string - Unclean
Leader stringElection Enable
- Cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - Compression
Type string - Delete
Retention stringMs - File
Delete stringDelay Ms - Flush
Messages string - Flush
Ms string - Index
Interval stringBytes - Max
Compaction stringLag Ms - Max
Message stringBytes - Message
Downconversion stringEnable - Message
Format stringVersion - Message
Timestamp stringDifference Max Ms - Message
Timestamp stringType - Min
Cleanable stringDirty Ratio - Min
Compaction stringLag Ms - Min
Insync stringReplicas - Preallocate string
- Retention
Bytes string - DEPRECATED use config.retention_bytes instead Retention bytes.
- Retention
Ms string - Segment
Bytes string - Segment
Index stringBytes - Segment
Jitter stringMs - Segment
Ms string - Unclean
Leader stringElection Enable
- cleanup
Policy String - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - compression
Type String - delete
Retention StringMs - file
Delete StringDelay Ms - flush
Messages String - flush
Ms String - index
Interval StringBytes - max
Compaction StringLag Ms - max
Message StringBytes - message
Downconversion StringEnable - message
Format StringVersion - message
Timestamp StringDifference Max Ms - message
Timestamp StringType - min
Cleanable StringDirty Ratio - min
Compaction StringLag Ms - min
Insync StringReplicas - preallocate String
- retention
Bytes String - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Ms String - segment
Bytes String - segment
Index StringBytes - segment
Jitter StringMs - segment
Ms String - unclean
Leader StringElection Enable
- cleanup
Policy string - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - compression
Type string - delete
Retention stringMs - file
Delete stringDelay Ms - flush
Messages string - flush
Ms string - index
Interval stringBytes - max
Compaction stringLag Ms - max
Message stringBytes - message
Downconversion stringEnable - message
Format stringVersion - message
Timestamp stringDifference Max Ms - message
Timestamp stringType - min
Cleanable stringDirty Ratio - min
Compaction stringLag Ms - min
Insync stringReplicas - preallocate string
- retention
Bytes string - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Ms string - segment
Bytes string - segment
Index stringBytes - segment
Jitter stringMs - segment
Ms string - unclean
Leader stringElection Enable
- cleanup_
policy str - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - compression_
type str - delete_
retention_ strms - file_
delete_ strdelay_ ms - flush_
messages str - flush_
ms str - index_
interval_ strbytes - max_
compaction_ strlag_ ms - max_
message_ strbytes - message_
downconversion_ strenable - message_
format_ strversion - message_
timestamp_ strdifference_ max_ ms - message_
timestamp_ strtype - min_
cleanable_ strdirty_ ratio - min_
compaction_ strlag_ ms - min_
insync_ strreplicas - preallocate str
- retention_
bytes str - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention_
ms str - segment_
bytes str - segment_
index_ strbytes - segment_
jitter_ strms - segment_
ms str - unclean_
leader_ strelection_ enable
- cleanup
Policy String - DEPRECATED use config.cleanup_policy instead Topic cleanup policy. The possible values are
deleteandcompact. - compression
Type String - delete
Retention StringMs - file
Delete StringDelay Ms - flush
Messages String - flush
Ms String - index
Interval StringBytes - max
Compaction StringLag Ms - max
Message StringBytes - message
Downconversion StringEnable - message
Format StringVersion - message
Timestamp StringDifference Max Ms - message
Timestamp StringType - min
Cleanable StringDirty Ratio - min
Compaction StringLag Ms - min
Insync StringReplicas - preallocate String
- retention
Bytes String - DEPRECATED use config.retention_bytes instead Retention bytes.
- retention
Ms String - segment
Bytes String - segment
Index StringBytes - segment
Jitter StringMs - segment
Ms String - unclean
Leader StringElection Enable
GetKafkaTopicTag
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.
Viewing docs for Aiven v4.5.2 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi