Skip to content

google_pubsub_subscription - add 'max_messages' to cloud_storage_config #19317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels
enhancement forward/review In review; remove label to forward service/pubsub

Comments

@lahuang4
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

Pub/Sub's Cloud Storage subscriptions now allow batching by max_messages per file. I suggest adding this field to the cloud_storage_config block for google_pubsub_subscription (I am creating a PR to address this shortly).

New or Affected Resource(s)

  • google_pubsub_subscription

Potential Terraform Configuration

resource "google_pubsub_subscription" "example" {
  name  = "example-subscription"
  topic = google_pubsub_topic.example.id

  cloud_storage_config {
    bucket = google_storage_bucket.example.name

    filename_datetime_format = "YYYYMM/DD/hh/mm_ss"
    filename_prefix = "pre-"
    filename_suffix = "-%{random_suffix}"

    max_bytes = 1000
    max_duration = "300s"
    max_messages = 1000
  }
  depends_on = [ 
    google_storage_bucket.example,
    google_storage_bucket_iam_member.admin,
  ]
}

References

See https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_batch

Copy link

github-actions bot commented Oct 3, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.