Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka_acl acl_operation to take a list #84

Closed
gergelysotidm opened this issue Nov 26, 2019 · 4 comments
Closed

kafka_acl acl_operation to take a list #84

gergelysotidm opened this issue Nov 26, 2019 · 4 comments

Comments

@gergelysotidm
Copy link

to mimick a producer, one needs describe, write and create actions on a topic. It would be nice if the kafka_acl resource could take a list of operations, because currently one needs to replicate the resource with the different operations

@Mongey
Copy link
Owner

Mongey commented Nov 28, 2019

Hey @gergelysotidm 👋 can you provide an example of what a config like this looks like currently and what a proposed syntax would be, thanks!

@Mongey
Copy link
Owner

Mongey commented Nov 28, 2019

Seems somewhat related to #70 in solving the common producer / consumer acl configs

@gergelysotidm
Copy link
Author

gergelysotidm commented Nov 29, 2019

Hi @Mongey
Here is how it could look like:

resource "kafka_acl" "groups" {
  resource_name = "my-group"
  resource_type = "Group"
  acl_principal = "myuser"
  acl_host = "*"
  acl_operation = ["Read", "Describe"]
  acl_permission_type = "Allow"
}

Today, one needs to duplicate this resource, one fore each acl_operation.
Indeed, this is related to #70 , but I think once we have this, the producer-consumer can become an alias to a set of operations.

@evsasha
Copy link

evsasha commented Jan 30, 2020

Hello @gergelysotidm , you can use loop:

resource "kafka_acl" "groups" {
  for_each = {
    acl1 = "Read"
    acl2 = "Describe"
  }
  resource_name = "my-group"
  resource_type = "Group"
  acl_principal = "myuser"
  acl_host = "*"
  acl_operation = each.value
  acl_permission_type = "Allow"
}

@Mongey Mongey closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants