Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add account_management_events topic #391

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions dev-aws/kafka-shared-msk/iam/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,37 @@ module "castle_processor" {
consume_topics = [(kafka_topic.iam_credentials_v1.name)]
consume_groups = ["iam.castle-processor"]
}


resource "kafka_topic" "iam_account_management_events" {
name = "auth-customer.iam-account-management-events"
replication_factor = "3"
partitions = "15"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this many partitions is overkill 🤔

config = {

# Use tiered storage
"remote.storage.enable" = "true"
# retain 100MB on each partition
"retention.bytes" = "104857600"
# keep data for 7 days
"retention.ms" = "604800000"
# keep data in hot storage for 2 days
"local.retention.ms" = "172800000"
# allow max 1 MB for a message
"max.message.bytes" = "1048576"
"compression.type" = "zstd"
"cleanup.policy" = "delete"
}
}

module "iam_accounts_management_service" {
source = "../../../modules/tls-app"
cert_common_name = "clubhouse/account-management-service"
produce_topics = [[kafka_topic.iam_account_management_events.name]]
}

module "iam_accounts_management_projector" {
source = "../../../modules/tls-app"
cert_common_name = "clubhouse/account_management-projector"
produce_topics = [(kafka_topic.iam_account_management_events.name)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might also need consume topics and group, right?

}
35 changes: 35 additions & 0 deletions prod-aws/kafka-shared-msk/iam/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,38 @@ module "castle_processor" {
consume_topics = [(kafka_topic.iam_credentials_v1.name)]
consume_groups = ["iam.castle-processor"]
}



resource "kafka_topic" "iam_account_management_events" {
name = "auth-customer.iam-account-management-events"
replication_factor = "3"
partitions = "15"
config = {

# Use tiered storage
"remote.storage.enable" = "true"
# retain 100MB on each partition
"retention.bytes" = "104857600"
# keep data for 7 days
"retention.ms" = "604800000"
# keep data in hot storage for 2 days
"local.retention.ms" = "172800000"
# allow max 1 MB for a message
"max.message.bytes" = "1048576"
"compression.type" = "zstd"
"cleanup.policy" = "delete"
}
}

module "iam_accounts_management_service" {
source = "../../../modules/tls-app"
cert_common_name = "clubhouse/account-management-service"
produce_topics = [[kafka_topic.iam_account_management_events.name]]
}

module "iam_accounts_management_projector" {
source = "../../../modules/tls-app"
cert_common_name = "clubhouse/account_management-projector"
produce_topics = [(kafka_topic.iam_account_management_events.name)]
}
Loading