Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Removes Google Cloud Function runs for transferring data to BiqQuery
Browse files Browse the repository at this point in the history
The functionality of these Google Cloud Functions has been integrated
directly into the Search API repo via two rake tasks
alphagov/search-api-v2#351.
  • Loading branch information
chaecramb committed Dec 5, 2024
1 parent 5b98843 commit 3c43d36
Showing 1 changed file with 0 additions and 120 deletions.
120 changes: 0 additions & 120 deletions terraform/environment/events_ingestion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -362,123 +362,3 @@ resource "google_cloudfunctions2_function" "import_user_events_vertex" {
}
}
}

# scheduler resource that will transfer `search` vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_search_to_vertex" {
name = "transfer_search_event_to_vertex_datastore"
description = "transfer search vertex bq data to vertex datastore"
schedule = "30 12 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"search\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

# scheduler resource that will transfer `view-item` vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_view_item_to_vertex" {
name = "transfer_view_item_to_vertex_datastore"
description = "transfer view item vertex bq data to vertex datastore"
schedule = "45 12 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"view-item\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

# scheduler resource that will transfer `view-item` vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_view_item_external_link_to_vertex" {
name = "transfer_view_item_external_link_to_vertex_datastore"
description = "transfer view item external link vertex bq data to vertex datastore"
schedule = "40 12 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"view-item-external-link\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

# scheduler resource that will transfer `search` intraday vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_search_intraday_to_vertex" {
name = "transfer_search_intraday_event_to_vertex_datastore"
description = "transfer search intraday vertex bq data to vertex datastore"
schedule = "50 05,11,17,23 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"search-intraday\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

# scheduler resource that will transfer `view-item` intraday vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_view_item_intraday_to_vertex" {
name = "transfer_view_item_intraday_to_vertex_datastore"
description = "transfer view item intraday vertex bq data to vertex datastore"
schedule = "55 05,11,17,23 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"view-item-intraday\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

# scheduler resource that will transfer `view-item-external-link` intraday vertex bq data - > vertex datastore
resource "google_cloud_scheduler_job" "daily_transfer_bq_view_item_external_link_intraday_to_vertex" {
name = "transfer_view_item_external_link_intraday_to_vertex_datastore"
description = "transfer view item external link intraday vertex bq data to vertex datastore"
schedule = "45 05,11,17,23 * * *"
time_zone = "Europe/London"
http_target {
http_method = "POST"
uri = google_cloudfunctions2_function.import_user_events_vertex.url
body = base64encode("{ \"event_type\" : \"view-item-external-link-intraday\", \"date\" : null}")
headers = {
"Content-Type" = "application/json"
}
oidc_token {
service_account_email = google_service_account.analytics_events_pipeline.email
audience = google_cloudfunctions2_function.import_user_events_vertex.url
}
}
}

0 comments on commit 3c43d36

Please sign in to comment.