Skip to content

Commit

Permalink
Add Retention Duration to google_pubsub_topic (#5347)
Browse files Browse the repository at this point in the history
Co-authored-by: upodroid <cy@borg.dev>
  • Loading branch information
upodroid authored Nov 4, 2021
1 parent 94fa75f commit 6d12393
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mmv1/products/pubsub/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ objects:
- :ENCODING_UNSPECIFIED
- :JSON
- :BINARY
- !ruby/object:Api::Type::String
name: 'messageRetentionDuration'
description: |
Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
Cannot be more than 7 days or less than 10 minutes.
- !ruby/object:Api::Resource
name: 'Subscription'
description: |
Expand Down
2 changes: 2 additions & 0 deletions mmv1/templates/terraform/examples/pubsub_topic_basic.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" {
labels = {
foo = "bar"
}

message_retention_duration = "86600s"
}

0 comments on commit 6d12393

Please sign in to comment.