nats-io / terraform-provider-jetstream

Terraform Provider to manage NATS JetStream
Apache License 2.0
55 stars 13 forks source link

Terraform Consumer Resource config `max_waiting` cannot be set when `delivery_subject` is empty #114

Open ianbbqzy opened 4 months ago

ianbbqzy commented 4 months ago

What version were you using?

nats-server: v2.10.12

What environment was the server running in?

ubuntu terraform

Is this defect reproducible?

Cannot set max_waiting for consumer resource with an empty delivery_subject. Based on my understandings and the README, the former is a pull pased consumer config while the latter is a push-based consumer config. Should it be the opposite where max_waiting can be set only when delivery_subject is empty?

https://github.com/nats-io/terraform-provider-jetstream/blob/e3cb3957e67b35afbc4614c4f0e2d73c9e9acdc6/jetstream/resource_jetstream_consumer.go#L291

Given the capability you are leveraging, describe your expectation?

max_waiting can be set even when delivery_subject is empty

Given the expectation, what is the defect you are observing?

max_waiting cannot be set when delivery_subject is empty

ripienaar commented 4 months ago

indeed seems like a bug I agree, want to send a small PR to fix?