From 9827b2e78a3742a4f3e4ad9c8aaf4e0f8369a0f4 Mon Sep 17 00:00:00 2001 From: patrick ansbro <66091489+pansbro12@users.noreply.github.com> Date: Fri, 3 Jan 2025 15:07:08 +0000 Subject: [PATCH] [AP-Dev] create account_history_v1 topic (#746) Co-authored-by: Denis Nikulin --- .../account-identity/account.tf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dev-aws/kafka-shared-msk/account-identity/account.tf b/dev-aws/kafka-shared-msk/account-identity/account.tf index 2673b200..27b5ac1b 100644 --- a/dev-aws/kafka-shared-msk/account-identity/account.tf +++ b/dev-aws/kafka-shared-msk/account-identity/account.tf @@ -132,6 +132,22 @@ resource "kafka_topic" "account_identity_account_bill_writes_public" { replication_factor = 3 } +resource "kafka_topic" "account_identity_account_history_v1" { + config = { + "cleanup.policy" = "delete" + "compression.type" = "zstd" + # keep data forever + "retention.ms" = "-1" + # enable remote storage + "remote.storage.enable" = "true" + # keep data in primary storage for 1 day + "local.retention.ms" = "86400000" + } + name = "account-identity.account.history.v1" + partitions = 15 + replication_factor = 3 +} + moved { from = kafka_topic.account_identity_accunt_bill_writes_public to = kafka_topic.account_identity_account_bill_writes_public @@ -186,6 +202,14 @@ module "account_identity_account_api_change_notifier" { cert_common_name = "account-platform/account_api_change_notifier" } +module "account_identity_account_api_history" { + source = "../../../modules/tls-app" + consume_topics = [kafka_topic.account_identity_account_atomic_v1.name] + consume_groups = ["account-identity.account-api-history"] + produce_topics = [kafka_topic.account_identity_account_history_v1.name] + cert_common_name = "account-platform/account_api_history" +} + module "account_identity_account_v2_to_legacy" { source = "../../../modules/tls-app" consume_topics = [kafka_topic.account_identity_account_events_v2.name]