Skip to content

Commit

Permalink
feat: Add support for message_retention_duration (#19)
Browse files Browse the repository at this point in the history
* Add support for message_retention_duration

This attribute is supported by the google_pubsub_subscription resource, but cannot be set through this module yet.

* Use null for default retention duration

* Typo fix in main.tf

Co-Authored-By: Morgante Pell <[email protected]>

Co-authored-by: Morgante Pell <[email protected]>
  • Loading branch information
Karunamon and morgante authored Feb 7, 2020
1 parent 7cfff3b commit 71a81ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ resource "google_pubsub_subscription" "push_subscriptions" {
"ack_deadline_seconds",
local.default_ack_deadline_seconds,
)
message_retention_duration = lookup(
var.push_subscriptions[count.index],
"message_retention_duration",
null,
)

push_config {
push_endpoint = var.push_subscriptions[count.index]["push_endpoint"]
Expand All @@ -66,7 +71,11 @@ resource "google_pubsub_subscription" "pull_subscriptions" {
"ack_deadline_seconds",
local.default_ack_deadline_seconds,
)
message_retention_duration = lookup(
var.pull_subscriptions[count.index],
"message_retention_duration",
null,
)

depends_on = [google_pubsub_topic.topic]
}

0 comments on commit 71a81ac

Please sign in to comment.