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] : []