Skip to content

cgroschupp/terraform-provider-confluent-cloud

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-plugin-confluent-cloud

A Terraform plugin for managing Confluent Cloud Kafka Clusters.

Installation

Download and extract the latest release to your terraform plugin directory (typically ~/.terraform.d/plugins/)

Example

Configure the provider directly, or set the ENV variables CONFLUENT_CLOUD_USERNAME &CONFLUENT_CLOUD_PASSWORD

provider "confluentcloud" {}

resource "confluentcloud_kafka_cluster" "test" {
  name             = "provider-test"
  service_provider = "aws"
  region           = "eu-west-1"
  availability     = "single-zone"
}

resource "confluentcloud_api_key" "provider_test" {
  cluster_id = confluentcloud_kafka_cluster.test.id
}

provider "kafka" {
  bootstrap_servers = [replace(confluentcloud_kafka_cluster.test.bootstrap_servers, "SASL_SSL://", "")]

  tls_enabled    = true
  sasl_username  = confluentcloud_api_key.provider_test.key
  sasl_password  = confluentcloud_api_key.provider_test.secret
  sasl_mechanism = "plain"
}

resource "kafka_topic" "syslog" {
  name               = "syslog2"
  replication_factor = 3
  partitions         = 1
}

output "kafka_url" {
  value = replace(confluentcloud_kafka_cluster.test.bootstrap_servers, "SASL_SSL://", "")
}

output "key" {
  value = confluentcloud_api_key.provider_test.key
}

output "secret" {
  value = confluentcloud_api_key.provider_test.secret
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 57.1%
  • Makefile 21.6%
  • Shell 21.3%