> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# upstash_kafka_topic_data

<RequestExample>
  ```hcl example.tf
  data "upstash_kafka_topic_data" "kafkaTopicData" {
    topic_id = resource.upstash_kafka_topic.exampleKafkaTopic.topic_id
  }
  ```
</RequestExample>

## Schema

### Required

<ParamField query="topic_id" type="string" required>
  Unique Topic ID for requested kafka topic
</ParamField>

### Read-Only

<ParamField query="cleanup_policy" type="string">
  Cleanup policy will be used in the topic (`compact` or `delete`)
</ParamField>

<ParamField query="cluster_id" type="string">
  ID of the cluster the topic will be deployed in
</ParamField>

<ParamField query="creation_time" type="number">
  Creation time of the topic
</ParamField>

<ParamField query="id" type="string">
  The ID of this resource.
</ParamField>

<ParamField query="max_message_size" type="map(string)">
  Max message size in the topic
</ParamField>

<ParamField query="multizone" type="bool">
  Whether multizone replication is enabled
</ParamField>

<ParamField query="partitions" type="map(string)">
  The number of partitions the topic will have
</ParamField>

<ParamField query="password" type="string">
  Password to be used in authenticating to the cluster
</ParamField>

<ParamField query="region" type="string">
  Region of the kafka topic. Possible values (may change) are: `eu-west-1`,
  `us-east-1`
</ParamField>

<ParamField query="rest_endpoint" type="string">
  REST Endpoint of the kafka topic
</ParamField>

<ParamField query="retention_size" type="number">
  The number of partitions the topic will have
</ParamField>

<ParamField query="retention_time" type="string">
  Retention time of messages in the topic
</ParamField>

<ParamField query="state" type="string">
  State of the credential. `active` or `deleted`
</ParamField>

<ParamField query="tcp_endpoint" type="string">
  TCP Endpoint of the kafka topic
</ParamField>

<ParamField query="topic_id" type="string">
  Unique Cluster ID for created topic
</ParamField>

<ParamField query="username" type="string">
  Base64 encoded username to be used in authenticating to the cluster
</ParamField>
