Terraform module for Confluent Cloud Topics creation.
Provide a list of Topics and RBAC configuration.
Name | Version |
---|---|
terraform | >= 1.3.0 |
confluent | ~>1.51.0 |
Name | Version |
---|---|
confluent | 1.21.0 |
Name | Source | Version |
---|---|---|
topic | ./topic | n/a |
Name | Type |
---|---|
confluent_environment.env | data source |
confluent_kafka_cluster.cluster | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster | Confluent Cloud Cluster ID | string |
n/a | yes |
cluster_credentials | Confluent Cloud Cluster Credentials | object({ |
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({ |
n/a | yes |
Name | Description |
---|---|
topics | n/a |
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.