Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Terraform Cloud functions V1 subscription dead letter topic query

Hi there! 

When using V1 cloud functions with Terraform. How can I add a dead letter queue to the
`event_trigger` resource of the `google_cloudfunctions_function` resource. 

What I want to do is have a dead letter queue that after X number of retries the subscription sends it to the dead letter. However, `event_trigger` doesn't take a dead letter property. It appears I can add this via clickops but not Terraform.

Some example Terraform

 

```Terraform
resource "google_cloudfunctions_function" "simple_example" {
  name    = "my_func"
 
  event_trigger {
    event_type = "google.pubsub.topic.publish"
    resource   = google_pubsub_topic.integrations.example.name
    failure_policy {
      retry = true
    }
  }
```

 



0 1 402
1 REPLY 1

Welcome to Google Cloud Community!

Upon checking, the dead-letter queue is not currently supported by Cloud Function. This feature can be really useful once implemented. We recommend creating a feature request for this matter.

Thanks!