streamnative/terraform-provider-pulsar

Function resource

lanwen opened this issue ยท 2 comments

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

Would be nice to have a function definition as a resource.

New or Affected Resource(s)

  • pulsar_function

Potential Terraform Configuration

resource "pulsar_function" "function_example" {
  tenant     = "public"
  namespace  = "default"
  topics_pattern: "topic-*",
  processing_guarantee: "at-least-once",
  runtime: "java",
  fqfn: "my_function",
  name: "my_func",
  class_name: "com.example.Func",
  secrets:  {
     token = "secret"
  }
}

References

I think lambdas could be used for the inspiration
https://www.terraform.io/docs/providers/aws/r/lambda_function.html
https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_lambda_function.go

or https://www.terraform.io/docs/providers/google/r/cloudfunctions_function.html

I can try to implement some naive implementation to get it working and grab some feedback

sijie commented

@lanwen this is a great feature. looking forward to your implementation.