Set PubSub Subscription Expiration to Never Expire via Terraform

Per the Terraform documentation for pusub subscription, the ttl parameter is required. The only way to get around this is to set it to empy string -

  expiration_policy {
    ttl = ""
  }

Updated: full pubsub subscription resource definition example -

  resource "google_pubsub_subscription" "test-sub" {
  name  = "test-sub"
  topic = "projects/PROJECT_ID/topics/TOPIC_NAME"
  expiration_policy {
    ttl = ""
  }
}