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

[feat] Add subscription expiration option to namespaces #133

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,19 @@ resource "pulsar_namespace" "test" {

namespace_config nested schema

| Property | Description | Required |
| -------------------------------- | ---------------------------------------------- | -------- |
| `anti_affinity` | Anti-affinity group name | No |
| `is_allow_auto_update_schema` | Is schema auto-update allowed | No |
| `max_consumers_per_subscription` | Sets the max consumers per subscription | No |
| `max_consumers_per_topic` | Sets the max consumers per topic | No |
| `max_producers_per_topic` | Sets the max producers per topic | No |
| `message_ttl_seconds` | Sets the message TTL in seconds | No |
| `replication_clusters` | List of replication clusters for the namespace | No |
| `schema_compatibility_strategy` | Set schema compatibility strategy | No |
| `schema_validation_enforce` | Enable or disable schema validation | No |
| `offload_threshold_size_in_mb` | Set topic offload threshold size in MB | No |
| Property | Description | Required |
|----------------------------------------|--------------------------------------------------|----------|
| `anti_affinity` | Anti-affinity group name | No |
| `is_allow_auto_update_schema` | Is schema auto-update allowed | No |
| `max_consumers_per_subscription` | Sets the max consumers per subscription | No |
| `max_consumers_per_topic` | Sets the max consumers per topic | No |
| `max_producers_per_topic` | Sets the max producers per topic | No |
| `message_ttl_seconds` | Sets the message TTL in seconds | No |
| `offload_threshold_size_in_mb` | Set topic offload threshold size in MB | No |
| `replication_clusters` | List of replication clusters for the namespace | No |
| `schema_compatibility_strategy` | Set schema compatibility strategy | No |
| `schema_validation_enforce` | Enable or disable schema validation | No |
| `subscription_expiration_time_minutes` | Sets the subscription expiration time in minutes | No |

The `schema_compatibility_strategy` can take the following values:

Expand Down
1 change: 1 addition & 0 deletions docs/resources/namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Optional:
- `replication_clusters` (List of String)
- `schema_compatibility_strategy` (String)
- `schema_validation_enforce` (Boolean)
- `subscription_expiration_time_minutes` (Number)


<a id="nestedblock--permission_grant"></a>
Expand Down
14 changes: 7 additions & 7 deletions examples/namespaces/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ resource "pulsar_namespace" "test" {
namespace = "eternals"

namespace_config {
anti_affinity = "anti-aff"
max_consumers_per_subscription = "50"
max_consumers_per_topic = "50"
max_producers_per_topic = "50"
message_ttl_seconds = "86400"
replication_clusters = [
"standalone"]
anti_affinity = "anti-aff"
max_consumers_per_subscription = "50"
max_consumers_per_topic = "50"
max_producers_per_topic = "50"
message_ttl_seconds = "86400"
replication_clusters = ["standalone"]
subscription_expiration_time_minutes = 90
}

dispatch_rate {
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/streamnative/terraform-provider-pulsar
go 1.18

require (
github.com/apache/pulsar-client-go v0.12.0
github.com/cenkalti/backoff/v4 v4.1.2
github.com/apache/pulsar-client-go v0.14.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/terraform-plugin-log v0.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.16.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.0
github.com/stretchr/testify v1.9.0
)

require (
Expand All @@ -23,11 +23,11 @@ require (
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
Expand Down Expand Up @@ -58,15 +58,15 @@ require (
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading