Mongey / terraform-provider-kafka

Terraform provider for managing Apache Kafka Topics + ACLs
MIT License
518 stars 129 forks source link

Overrides for Topic Placement Policy #409

Open eric-gonzales opened 5 months ago

eric-gonzales commented 5 months ago

We are currently trying to create an initial topic using a Multi-Region placement policy. Seeing that topic management traditionally expects replication-factor to be set and implemented in client abstractions, we are needing to be able to override the parameter.

As a workaround, we are applying a placement policy after the initial topic creation using the replication-factor setting.

Would it be possible to allow for this override during topic creation for proper topic placement policy upon topic creation?

canhanhan commented 5 months ago

Additional context to @eric-gonzales: The issue is that on Confluent Kafka; when confluent.placement.constraints is provided in config during topic creation; replication-factor should not be set. The valid value is "-1" which is not allowed by the provider. @Mongey are you okay if I create a PR that makes repication_factor optional if confluent.placement.constraints is defined?