Skip to content

google_storage_notification object_name_regex #24765

@BostjanBozic

Description

@BostjanBozic

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

It would be great if google_storage_notification would support configuring object filter using regex. Currently only object_name_prefix is possible.

What I would like to achieve is to push to Pub/Sub topic an event every time when e.g. a file with name something.again is uploaded anywhere on the bucket (so object prefix can not be static).

New or Affected Resource(s)

  • google_storage_notification

Potential Terraform Configuration

resource "google_storage_notification" "notification" {
  bucket         = google_storage_bucket.bucket.name
  payload_format = "JSON_API_V1"
  topic          = google_pubsub_topic.topic.id
  event_types    = ["OBJECT_FINALIZE", "OBJECT_METADATA_UPDATE"]
  object_name_regex = ["*/something.again"]
}

References

No response

b/453676196

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions