Skip to content

mcolomerc/terraform-confluent-topics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Confluent Cloud Topics Module

Terraform module for Confluent Cloud Topics creation.

Provide a list of Topics and RBAC configuration.

Requirements

Name Version
terraform >= 1.3.0
confluent ~>1.51.0

Providers

Name Version
confluent 1.21.0

Modules

Name Source Version
topic ./topic n/a

Resources

Name Type
confluent_environment.env data source
confluent_kafka_cluster.cluster data source

Inputs

Name Description Type Default Required
cluster Confluent Cloud Cluster ID string n/a yes
cluster_credentials Confluent Cloud Cluster Credentials
object({ 
api_key = string
api_secret = string
})
n/a yes
environment Confluent Cloud Environment ID string n/a yes
rbac_enabled Enable RBAC. If true producer/consumer will be used to configure Role Bindings for the Topic bool false no
topics List of Topics. If RBAC enabled producer service account will be configured as DeveloperWrite and consumer will be configured as DeveloperRead.
list(object({
name = string
partitions = number
config = map(string)
consumer = optional(string)
producer = optional(string)
}))
n/a yes

Outputs

Name Description
topics n/a

Topic Deletion

This module uses lifecycle { prevent_destroy = false }, to prevent accidental topic deletion use prevent_destroy = true

This setting rejects plans that would destroy or recreate the topic, such as attempting to change uneditable attributes (for example, partitions_count).

lifecycle {
    prevent_destroy = false
  }

When prevent_destroy = true:

Resource module.topic["topic_name"].confluent_kafka_topic.topic has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed. To avoid this error and continue with the plan, either disable │ lifecycle.prevent_destroy or reduce the scope of the plan using the -target flag.

About

Terraform module for Confluent Cloud Topics management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages