From 2648906296f99acc5ca5c4f5696e00ae5e1d5f87 Mon Sep 17 00:00:00 2001 From: Darren West Date: Wed, 18 Dec 2024 14:52:37 +0000 Subject: [PATCH] [Dev-Enablement] Create pilotcd topic (#736) ### Summary - Introduce dev-enablement directory - Introduce topic for pilotcd and a producer and consumer. - I havent created a new team for a while so may have missed something? --- .../dev-enablement/__backend.tf | 8 ++++++ .../kafka-shared-msk/dev-enablement/__env.tf | 1 + .../dev-enablement/pilotcd.tf | 28 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 dev-aws/kafka-shared-msk/dev-enablement/__backend.tf create mode 120000 dev-aws/kafka-shared-msk/dev-enablement/__env.tf create mode 100644 dev-aws/kafka-shared-msk/dev-enablement/pilotcd.tf diff --git a/dev-aws/kafka-shared-msk/dev-enablement/__backend.tf b/dev-aws/kafka-shared-msk/dev-enablement/__backend.tf new file mode 100644 index 00000000..8b355a14 --- /dev/null +++ b/dev-aws/kafka-shared-msk/dev-enablement/__backend.tf @@ -0,0 +1,8 @@ +terraform { + backend "s3" { + bucket = "uw-dev-pubsub-tf-applier-state" + key = "dev-aws/kafka-shared-msk-dev-enablement" + region = "eu-west-1" + encrypt = true + } +} diff --git a/dev-aws/kafka-shared-msk/dev-enablement/__env.tf b/dev-aws/kafka-shared-msk/dev-enablement/__env.tf new file mode 120000 index 00000000..3c451396 --- /dev/null +++ b/dev-aws/kafka-shared-msk/dev-enablement/__env.tf @@ -0,0 +1 @@ +../__env.tf \ No newline at end of file diff --git a/dev-aws/kafka-shared-msk/dev-enablement/pilotcd.tf b/dev-aws/kafka-shared-msk/dev-enablement/pilotcd.tf new file mode 100644 index 00000000..b9c61b34 --- /dev/null +++ b/dev-aws/kafka-shared-msk/dev-enablement/pilotcd.tf @@ -0,0 +1,28 @@ +resource "kafka_topic" "dev_enablement_pilotcd_v1" { + config = { + "cleanup.policy" = "delete" + "compression.type" = "zstd" + # keep data in primary storage for 1 day + "local.retention.ms" = "86400000" + # enable remote storage + "remote.storage.enable" = "true" + # keep data for 7 days + "retention.ms" = "604800000" + } + name = "dev-enablement.pilotcd.v1" + partitions = 5 + replication_factor = 3 +} + +module "dev_enablement_pilotcd_api" { + source = "../../../modules/tls-app" + produce_topics = [kafka_topic.dev_enablement_pilotcd_v1.name] + cert_common_name = "dev_enablement/pilotcd_api" +} + +module "dev_enablement_pilotcd_worker" { + source = "../../../modules/tls-app" + consume_topics = [kafka_topic.dev_enablement_pilotcd_v1.name] + consume_groups = ["dev_enablement.pilotcd.api"] + cert_common_name = "crm/okta-projector" +}