From bc66597a04fcdd819b9b42bb2ec5cbec3d151524 Mon Sep 17 00:00:00 2001 From: Lauren Huang Date: Thu, 14 Nov 2024 14:32:06 -0500 Subject: [PATCH] feat(TPG>=6.2)!: add cloud storage max_messages and use_topic_schema support (#204) --- README.md | 2 ++ main.tf | 4 +++- test/setup/versions.tf | 4 ++-- versions.tf | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6637950..e5333f1 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,10 @@ module "pubsub" { filename_datetime_format = "YYYY-MM-DD/hh_mm_ssZ" // optional max_duration = "60s" // optional max_bytes = "10000000" // optional + max_messages = "10000" // optional output_format = "avro" // optional write_metadata = false // optional + use_topic_schema = false // optional } ] } diff --git a/main.tf b/main.tf index 06141e2..45755f7 100644 --- a/main.tf +++ b/main.tf @@ -445,10 +445,12 @@ resource "google_pubsub_subscription" "cloud_storage_subscriptions" { filename_datetime_format = lookup(each.value, "filename_datetime_format", null) max_duration = lookup(each.value, "max_duration", null) max_bytes = lookup(each.value, "max_bytes", null) + max_messages = lookup(each.value, "max_messages", null) dynamic "avro_config" { for_each = (lookup(each.value, "output_format", "") == "avro") ? [true] : [] content { - write_metadata = lookup(each.value, "write_metadata", null) + write_metadata = lookup(each.value, "write_metadata", null) + use_topic_schema = lookup(each.value, "use_topic_schema", null) } } } diff --git a/test/setup/versions.tf b/test/setup/versions.tf index d1a102e..14ca44a 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -19,11 +19,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 5.31" + version = ">= 6.2" } google-beta = { source = "hashicorp/google-beta" - version = ">= 5.31" + version = ">= 6.2" } null = { source = "hashicorp/null" diff --git a/versions.tf b/versions.tf index 18e8ae3..85b7f5d 100644 --- a/versions.tf +++ b/versions.tf @@ -20,7 +20,7 @@ terraform { google = { source = "hashicorp/google" - version = ">= 5.31, < 7" + version = ">= 6.2, < 7" } }