@@ -1498,8 +1498,8 @@ resource "google_project_iam_member" "service_account_workflow_act_as_binding" {
14981498# 15. functions/refresh_materialized_view
14991499# Cloud Function for refresh_materialized_view
15001500resource "google_cloudfunctions2_function" "refresh_materialized_view" {
1501- name = " refresh-materialized-view- ${ var . environment } "
1502- description = " Function to refresh materialized views asynchronously."
1501+ name = " refresh-materialized-view"
1502+ description = " Function to refresh materialized view asynchronously."
15031503 location = var. gcp_region
15041504 depends_on = [google_secret_manager_secret_iam_member . secret_iam_member ]
15051505
@@ -1543,15 +1543,6 @@ 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-
15551546# Task queue to invoke refresh_materialized_view function
15561547resource "google_cloud_tasks_queue" "refresh_materialized_view_queue" {
15571548 name = " refresh-materialized-view-queue-${ var . environment } "
0 commit comments