https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/eventarc_trigger
I was looking to create a terraform file to help deploy an eventarc with its destination as a cloud function. On the terraform docs it says it was not available to configure. Does this mean I can only deploy the eventarc with a generic cloud function and would need to configure the rest through the GUI? Or is there another solution I can try to fully deploy it through terraform?
Or maybe can I try to create it through deploying a cloud function through terraform? If so how would I code the event_trigger block for the eventarc? Below I am guessing what it would be?
resource "google_cloudfunctions_function" "cloudfunc-name" {
name = "cloudfunc-name"
description = "cloud func desc"
runtime = "python39"
project = "googleproject"
region = "us-central1"
available_memory_mb = 256
max_instances = 10
timeout = 300
entry_point = "helloworld_entry"
source_archive_bucket = "filepath_to_bucket"
source_archive_object = google_storage_bucket_object.function_zip_bucket_object.name
event_trigger {
event_type = "google.cloud.audit.log.v1.written"
event = "google.cloud.bigquery.v2.TableService.InsertTable"
receive_event = "us-central1"
service_account = "someserviceaccount@gserviceaccount.com"
failure_policy {
retry = false
}
}