# ionoscloud\_kafka\_cluster

The **Kafka Cluster data source** can be used to search for and return an existing Kafka Cluster. You can provide a string for the name parameter which will be compared with provisioned Kafka Clusters. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

### By ID

```hcl
data "ionoscloud_kafka_cluster" "example" {
  id = "your_kafka_cluster_id"
  location = "location_of_kafka_cluster"
}
```

### By Name

Needs to have the resource be previously created, or a depends\_on clause to ensure that the resource is created before this data source is called.

```hcl
data "ionoscloud_kafka_cluster" "example" {
  name     = "kafka-cluster"
  location = "location_of_kafka_cluster"
}
```

## Argument Reference

* `id` - (Optional) ID of an existing Kafka Cluster that you want to search for.
* `name` - (Optional) Name of an existing Kafka Cluster that you want to search for.
* `location` - (Required) The location of the Kafka Cluster. Possible values: `de/fra`, `de/fra/2`, `de/txl`, `fr/par`, `es/vit`, `gb/lhr`, `gb/bhx`, `us/las`, `us/mci`, `us/ewr`.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - UUID of the Kafka Cluster.
* `name` - The name of the Kafka Cluster.
* `version` - The version of the Kafka Cluster.
* `size` - The size of the Kafka Cluster.
* `connections` - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
  * `datacenter_id` - The datacenter that your instance is connected to.
  * `lan_id` - The numeric LAN ID your instance is connected to.
  * `broker_addresses` - IP addresses and subnet of cluster brokers.
* `broker_addresses` - IP address and port of cluster brokers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/kafka_cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
