From 71a81ac4607d89ef7bedf839810cce978fb50eb6 Mon Sep 17 00:00:00 2001 From: Michael Parks Date: Fri, 7 Feb 2020 11:53:48 -0700 Subject: [PATCH] feat: Add support for message_retention_duration (#19) * 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 Co-authored-by: Morgante Pell --- main.tf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 536c983..5ea9c10 100644 --- a/main.tf +++ b/main.tf @@ -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"] @@ -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] } -