Skip to content

Commit

Permalink
gcp/kettle: fix PubSub topic attributes
Browse files Browse the repository at this point in the history
Follow-up of:
  - kubernetes#7370

The id of the PubSub topic is required instead of the topic's name.
  • Loading branch information
ameukam committed Oct 10, 2024
1 parent 68bc404 commit 2fb2bad
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions infra/gcp/terraform/kubernetes-public/k8s-kettle.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ data "google_iam_policy" "prod_kettle_dataset_iam_policy" {
// Ensure service accounts can create/update/get/delete dataset's table
binding {
members = [
"serviceAccount:${module.aaa_kettle_sa.email}",
"serviceAccount:${google_service_account.bq_kettle_data_transfer_writer.email}"
"serviceAccount:${module.aaa_kettle_sa.email}"
]
role = "roles/bigquery.user"
}
Expand Down Expand Up @@ -98,13 +97,13 @@ resource "google_pubsub_subscription_iam_binding" "subscription_binding" {

// Create a subscription in this project to the kubernetes-ci-logs-updates topic in k8s-infra-prow.
data "google_pubsub_topic" "kubernetes_ci_logs_topic" {
name = "kubernetes-ci-logs-updates"
name = "projects/k8s-infra-prow/topics/kubernetes-ci-logs-updates"
project = "k8s-infra-prow"
}

resource "google_pubsub_subscription" "kettle_ci_logs_subscription" {
name = "k8s-infra-kettle"
topic = data.google_pubsub_topic.kubernetes_ci_logs_topic.name
name = "k8s-infra-kettle"
topic = data.google_pubsub_topic.kubernetes_ci_logs_topic.id
project = data.google_project.project.project_id

filter = "attributes.eventType = \"OBJECT_FINALIZE\""
Expand Down

0 comments on commit 2fb2bad

Please sign in to comment.