Confluent Terraform Provider


Confluent Terraform Provider is currently available as part of a Preview Program. A Preview feature is a component of Confluent Platform introduced to gain feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent. Preview program features are intended for evaluation use in development and testing environments only, and not for production use. The warranty and Support Services provisions of your agreement with Confluent do not apply to Preview features. Confluent may discontinue providing preview releases of the Preview features at any time in Confluent’s sole discretion.

Use the Confluent Terraform provider to deploy and manage Confluent infrastructure.

The Confluent Terraform provider automates the workflow for managing environments, Kafka clusters, Kafka topics, service accounts, and more in Confluent Cloud.

Also, you can use this provider to grant ACLs and assign roles that enable access to the topics you create.

Example Terraform file

The following example shows a simple Terraform file that provisions a Confluent Cloud environment, a basic Kafka cluster, and a service account.

# Configure the Confluent Provider
terraform {
  required_providers {
    confluent = {
      source  = "confluentinc/confluent"
      version = "0.8.0"

provider "confluent" {
  api_key    = var.confluent_cloud_api_key    # optionally use CONFLUENT_CLOUD_API_KEY env var
  api_secret = var.confluent_cloud_api_secret # optionally use CONFLUENT_CLOUD_API_SECRET env var

# Create the resources ...

You must provide appropriate Confluent Cloud and Kafka cluster credentials to use the provider.

For more information about the resources that you can interact with, see the Confluent Terraform Provider documentation in the Terraform registry.

Sample project

For a realistic example that creates multiple Confluent Cloud resources, including a service account, an environment, a Basic Kafka cluster, a topic, and 2 ACLs, see the Sample Project for Confluent Terraform Provider.

Source code

For the provider source code, see the Confluent Terraform Provider repository on GitHub.