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

enhance(modular): add unique naming for ingestion_topic name #41

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Changes from all 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
11 changes: 4 additions & 7 deletions modules/integrations/pub-sub/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ resource "google_project_iam_audit_config" "audit_config" {
# Ingestion Topic
#-----------------------------------------------------------------------------------------
resource "google_pubsub_topic" "ingestion_topic" {
name = "ingestion_topic"
name = "ingestion_topic_${local.suffix}"
labels = var.labels
project = var.project_id
message_retention_duration = var.message_retention_duration
}

resource "google_pubsub_topic" "deadletter_topic" {
name = "dl-${google_pubsub_topic.ingestion_topic.name}"
name = "dl_${google_pubsub_topic.ingestion_topic.name}"
project = var.project_id
message_retention_duration = var.message_retention_duration
}
Expand Down Expand Up @@ -128,13 +128,10 @@ resource "google_service_account" "push_auth" {
project = var.project_id
}

resource "google_service_account_iam_binding" "push_auth_binding" {
resource "google_service_account_iam_member" "push_auth_binding" {
service_account_id = google_service_account.push_auth.name
role = "roles/iam.workloadIdentityUser"

members = [
"serviceAccount:${google_service_account.push_auth.email}",
]
member = "serviceAccount:${google_service_account.push_auth.email}"
}

resource "google_pubsub_subscription" "ingestion_topic_push_subscription" {
Expand Down
Loading