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

Allow Setting AutoTopicCreation on Pulsar Namespace Resources #111

Closed
asher-goldberg opened this issue Jan 4, 2024 · 1 comment · Fixed by #117
Closed

Allow Setting AutoTopicCreation on Pulsar Namespace Resources #111

asher-goldberg opened this issue Jan 4, 2024 · 1 comment · Fixed by #117
Assignees

Comments

@asher-goldberg
Copy link

asher-goldberg commented Jan 4, 2024

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

It would be nice to be able to set/override/remove auto topic creation through the namespace policies when adding a namespace resource via TF. We set this at the broker level but there are some namespace we don't want it on.

New or Affected Resource(s)

  • pulsar_namespace

Potential Terraform Configuration

I think the clearest way to do this is as a separate object within the resource like the retention and persistent policy blocks. The three keys below match what the admin client requires.

resource "pulsar_namespace" "namespace" {
  tenant = "public"
  namespace = "test"

  topic_auto_creation {
    allow = true
    type = "partitioned"
    partitions = 3
  } 
}
resource "pulsar_namespace" "namespace" {
  tenant = "public"
  namespace = "test"

  topic_auto_creation {
    allow = false
  } 
}

If allow is set to false then type and partitions should be optional.

@jiangpengcheng
Copy link
Member

jiangpengcheng commented Jan 5, 2024

The underlying library(pulsar-client-go) doesn't expose the GetTopicAutoCreation yet, so I created a PR here: apache/pulsar-client-go#1151

will add topic auto-creation in this repo after the above PR is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants