Skip to content

Commit 4b22d7f

Browse files
committed
ensured the service account has the required IAM permissions to invoke the refresh_materialized_view function in the northamerica-northeast1 region
1 parent 990cee3 commit 4b22d7f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

infra/functions-python/main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,15 @@ resource "google_cloudfunctions2_function_iam_member" "refresh_materialized_view
15431543
member = "serviceAccount:${google_service_account.functions_service_account.email}"
15441544
}
15451545

1546+
# Ensure the service account has the required IAM permissions to invoke the refresh_materialized_view function
1547+
resource "google_cloudfunctions2_function_iam_member" "refresh_materialized_view_invoker" {
1548+
project = var.project_id
1549+
location = "northamerica-northeast1" # Ensure the correct region is specified
1550+
cloud_function = google_cloudfunctions2_function.refresh_materialized_view.name
1551+
role = "roles/cloudfunctions.invoker"
1552+
member = "serviceAccount:${google_service_account.functions_service_account.email}"
1553+
}
1554+
15461555
# Task queue to invoke refresh_materialized_view function
15471556
resource "google_cloud_tasks_queue" "refresh_materialized_view_queue" {
15481557
name = "refresh-materialized-view-queue-${var.environment}"

0 commit comments

Comments
 (0)