From c3103305a150c55a720b8d94e2ab6fc493efe9b3 Mon Sep 17 00:00:00 2001 From: dkuji Date: Fri, 28 Jun 2024 02:30:14 +0900 Subject: [PATCH] feat: add enable_message_ordering attribute for push subscription (#195) --- README.md | 1 + main.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 7abc56c..fc7eb08 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ module "pubsub" { maximum_backoff = "600s" // optional minimum_backoff = "300s" // optional filter = "attributes.domain = \"com\"" // optional + enable_message_ordering = true // optional } ] pull_subscriptions = [ diff --git a/main.tf b/main.tf index 641b10f..9d0659c 100644 --- a/main.tf +++ b/main.tf @@ -194,6 +194,11 @@ resource "google_pubsub_subscription" "push_subscriptions" { "filter", null, ) + enable_message_ordering = lookup( + each.value, + "enable_message_ordering", + null, + ) dynamic "expiration_policy" { // check if the 'expiration_policy' key exists, if yes, return a list containing it. for_each = contains(keys(each.value), "expiration_policy") ? [each.value.expiration_policy] : []