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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement namespace permission grants/roles and actions #8

Open
mdjasper opened this issue Feb 26, 2020 · 1 comment
Open

Implement namespace permission grants/roles and actions #8

mdjasper opened this issue Feb 26, 2020 · 1 comment

Comments

@mdjasper
Copy link

mdjasper commented Feb 26, 2020

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Implement namespace permission grants/roles and actions.

I'm working with an in-house developed terraform pulsar provider, but would like to rather adopt an open source project. The ability to add permission grants would be important for our adoption, and I'm willing to work on a pull request for this feature. I wanted to check here first and see if this was already planned, or if someone else was already working on it before I get too far along.

Potential Terraform Configuration

resource "pulsar_namespace" "test" {
  ...
  permission_grant {
    role = "my-consumer"
    actions = ["consume"]
  }
}

or something like

variable "pulsar_custom_client_roles" {
  type    = list(string)
  default = []
}

resource "pulsar_namespace" "test" {
  ...
  dynamic "permission_grant" {
    for_each = var.pulsar_custom_client_roles
    content {
      role    = permission_grant.value
      actions = ["consume", "produce"]
    }
  }
}
ypt added a commit to get-bridge/terraform-provider-pulsar-streamnative that referenced this issue Dec 18, 2020
Usage follows the description here: streamnative#8

```
resource "pulsar_namespace" "test" {
  ...
  permission_grant {
    role = "my-consumer"
    actions = ["consume"]
  }
}
```
ypt added a commit to get-bridge/terraform-provider-pulsar-streamnative that referenced this issue Dec 21, 2020
Usage follows the description here: streamnative#8

```
resource "pulsar_namespace" "test" {
  ...
  permission_grant {
    role = "my-consumer"
    actions = ["consume"]
  }
}
```
ypt added a commit to get-bridge/terraform-provider-pulsar-streamnative that referenced this issue Dec 22, 2020
Usage follows the description here: streamnative#8

```
resource "pulsar_namespace" "test" {
  ...
  permission_grant {
    role = "my-consumer"
    actions = ["consume"]
  }
}
```
@ypt
Copy link
Contributor

ypt commented Dec 22, 2020

Here's a PR that implements what's proposed - #23

We're also interested in topic permission grants. I'm happy to implement an analogous PR for those, too, once we think the namespace permission implementation is headed in the right direction.

sijie pushed a commit that referenced this issue Dec 28, 2020
#22)

I stumbled across these minor issues while working on #23 / #8

1. A few state keys were not being set correctly in the namespace resource
2. A fix for this warning:
    > conversion from int to string yields a string of one rune,
    > not a string of digits (did you mean fmt.Sprint(x)?)
sijie pushed a commit that referenced this issue Jan 5, 2021
Usage follows the description here: #8

```
resource "pulsar_namespace" "test" {
  ...
  permission_grant {
    role = "my-consumer"
    actions = ["consume"]
  }
}
```
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