You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Hi
Pub/Sub Subscriptions with Cloud Storage config now allow definition of the filenameDatetimeFormat. Links below to Gcloud CLI and Pub/Sub API contain further information.
I suggest adding a field filename_datetime_format to the cloud_storage_config block for google_pubsub_subscription to handle this.
References to Pub/Sub API in reference section and sample configuration provided. Please note that the Pub/Sub service/API enforces some constraints on this field - namely than all of YYYYMMDDhhmmss must be used, but can be broken up with characters like /, -, _,:
husseyd
changed the title
google_pubsub_subscription - add 'file_datetime_format' to cloud_storage_config
google_pubsub_subscription - add 'filename_datetime_format' to cloud_storage_config
Apr 19, 2024
The google_pubsub_subscription resource will actually silently overwrite any filename_datetime_format config on the subscription that has been set on the subscription.
I discovered this as follows:
Create pubsub subscription in Terraform.
Update filename datetime format attribute of my pubsub subscription via Pubsub API (since the TF resource does not cater for this).
Make another change to the pubscription in Terraform (changed cloud_storage_config.max_bytes) (No diff was shown in the plan for the datetime format change)
Filename datetime format of the subsciption was reverted to the default after TF apply
This could be a bit of an issue as if any of my subscriptions are updated in TF, they will then revert to the default datetime format and files will appear in a different directory in GCS than they should
Community Note
Description
Hi
Pub/Sub Subscriptions with Cloud Storage config now allow definition of the filenameDatetimeFormat. Links below to Gcloud CLI and Pub/Sub API contain further information.
I suggest adding a field
filename_datetime_format
to thecloud_storage_config
block forgoogle_pubsub_subscription
to handle this.References to Pub/Sub API in reference section and sample configuration provided. Please note that the Pub/Sub service/API enforces some constraints on this field - namely than all of YYYYMMDDhhmmss must be used, but can be broken up with characters like
/
,-
,_
,:
New or Affected Resource(s)
Potential Terraform Configuration
References
See:
b/336319061
The text was updated successfully, but these errors were encountered: