This is a work in progress Confluent Cloud Terraform provider.
This project is not yet production ready.
This is only an initial commit. There are no releases at this time so you have to build this provider yourself. The features available are only the minimum in order to us (Swan.io) to deploy our non-production environments with Terraform.
Besides, this provider is using a non public/documented API so it can break whenever.
Why publishing at this time if it not yet usable ?
- If it can help other peoples trying to do the same thing
- Have feedback
- Manage Kafka topics
- Manage Kafka Clusters
- Manage API keys
- Add unit tests
- Add CI to create cross platform releases
- Add Datasource (Cluster/Topic/...)
- Write documentation
- [...]
Terraform should be able to access:
- Confluent API (https://confluent.cloud):
- Authentication
- Cluster Management
- API Keys
- Kafka cluster:
- Topics management
At this time, there is no releases so you should be able to build this provider yourself (there are a lot of documentation on how to create a Terraform provider). We hope to be able to create releases soon (in the TODO list).
provider "confluent" {
email = "xxxx" # Confluent cloud email
password = "YYYY" # Confluent cloud password
}
You can also use the following environment variables
$ export CONFLUENT_EMAIL=xxxx
$ export CONFLUENT_PASSWORD=YYYY
provider "confluent" { }
# Get Cluster
data "confluent_cluster" "cluster" {
name = "kafka-cluster"
}
resource "confluent_topic" "topic" {
cluster_id = confluent_cluster.cluster.id
name = "terraform"
num_partitions = 3
}
Available options are available in resource_confluent_topic.go (documentation not yet available).