File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1246,6 +1246,18 @@ resource "google_cloudfunctions2_function" "tasks_executor" {
12461246 }
12471247}
12481248
1249+ # Create the Pub/Sub topic used for publishing messages about rebuilding missing bounding boxes
1250+ resource "google_pubsub_topic" "rebuild_missing_bounding_boxes" {
1251+ name = " rebuild-bounding-boxes-topic"
1252+ }
1253+
1254+ # Grant the Cloud Functions service account permission to publish messages to the rebuild-bounding-boxes-topic Pub/Sub topic
1255+ resource "google_pubsub_topic_iam_member" "rebuild_missing_bounding_boxes_publisher" {
1256+ topic = google_pubsub_topic. rebuild_bounding_boxes . name
1257+ role = " roles/pubsub.publisher"
1258+ member = " serviceAccount:${ google_service_account . functions_service_account . email } "
1259+ }
1260+
12491261# IAM entry for all users to invoke the function
12501262resource "google_cloudfunctions2_function_iam_member" "tokens_invoker" {
12511263 project = var. project_id
You can’t perform that action at this time.
0 commit comments