Mongey/terraform-provider-kafka

Error when resource_type = Cluster

Opened this issue · 2 comments

Hello.
I am trying to create ACL

  + resource "kafka_acl" "kacls" {
      + acl_host                     = "*"
      + acl_operation                = "All"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:XXX-service"
      + id                           = (known after apply)
      + resource_name                = "*"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Cluster"
    }

But i get the following error:

Error: kafka server: This most likely occurs because of a request being malformed by the client library or the message was sent to an incompatible broker. See the broker logs for more details.

I see notjing in broker logs.

Known problem for resource_type Cluster
You need to change the resource_name, to the hardcoded value that kafka have:

resource_name = "kafka-cluster"

This should be mentioned in the documentation. It took me some time to find this issue!