confluent_kafka_cluster
describes a Kafka cluster data source.
provider "confluent" {
cloud_api_key = var.confluent_cloud_api_key # optionally use CONFLUENT_CLOUD_API_KEY env var
cloud_api_secret = var.confluent_cloud_api_secret # optionally use CONFLUENT_CLOUD_API_SECRET env var
}
data "confluent_kafka_cluster" "example_using_id" {
id = "lkc-abc123"
environment {
id = "env-xyz456"
}
}
resource "confluent_service_account" "test-sa" {
display_name = "app_mgr"
description = "app_mgr for ${data.confluent_kafka_cluster.example_using_id.display_name}"
}
data "confluent_kafka_cluster" "example_using_name" {
display_name = "basic_kafka_cluster"
environment {
id = "env-xyz456"
}
}
output "example_using_name" {
value = data.confluent_kafka_cluster.example_using_name
}
The following arguments are supported:
id
- (Optional String) The ID of the Kafka cluster, for example, lkc-abc123
.display_name
- (Optional String) A human-readable name for the Kafka cluster.environment
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Environment that the Kafka cluster belongs to, for example, env-xyz456
.In addition to the preceding arguments, the following attributes are exported:
id
- (Required String) The ID of the Kafka cluster, for example, lkc-abc123
.api_version
- (Required String) An API Version of the schema version of the Kafka cluster, for example, cmk/v2
.kind
- (Required String) A kind of the Kafka cluster, for example, Cluster
.display_name
- (Required String) The name of the Kafka cluster.availability
- (Required String) The availability zone configuration of the Kafka cluster. Accepted values are: SINGLE_ZONE
, MULTI_ZONE
, LOW
, and HIGH
.cloud
- (Required String) The cloud service provider that runs the Kafka cluster. Accepted values are: AWS
, AZURE
, and GCP
.region
- (Required String) The cloud service provider region where the Kafka cluster is running, for example, us-west-2
. See Cloud Providers and Regions for a full list of options for AWS, Azure, and GCP.basic
- (Optional Configuration Block) The configuration of the Basic Kafka cluster.standard
- (Optional Configuration Block) The configuration of the Standard Kafka cluster.enterprise
- (Optional Configuration Block) The configuration of the Enterprise Kafka cluster.dedicated
- (Optional Configuration Block) The configuration of the Dedicated Kafka cluster. It supports the following:
cku
- (Required Number) The number of Confluent Kafka Units (CKUs) for Dedicated cluster types. The minimum number of CKUs for SINGLE_ZONE
dedicated clusters is 1
whereas MULTI_ZONE
dedicated clusters must have 2
CKUs or more.zones
- (Required List of String) The list of zones the cluster is in.
On AWS, zones are AWS AZ IDs, for example, use1-az3
.
On GCP, zones are GCP zones, for example, us-central1-c
.
On Azure, zones are Confluent-chosen names (for example, 1
, 2
, 3
) since Azure does not have universal zone identifiers.network
(Optional Configuration Block) supports the following:
id
- (Required String) The ID of the Network that the Kafka cluster belongs to, for example, n-abc123
.byok_key
(Optional Configuration Block) supports the following:
id
- (Required String) The ID of the Confluent key that is used to encrypt the data in the Kafka cluster, for example, cck-lye5m
.bootstrap_endpoint
- (Required String) The bootstrap endpoint used by Kafka clients to connect to the Kafka cluster. (e.g., pkc-00000.us-central1.gcp.confluent.cloud:9092
).rest_endpoint
- (Required String) The REST endpoint of the Kafka cluster (e.g., https://pkc-00000.us-central1.gcp.confluent.cloud:443
).rbac_crn
- (Required String) The Confluent Resource Name of the Kafka cluster, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/cloud-cluster=lkc-abc123
.