Reputation: 31
We have different kinds of files in our source system (.txt, .xls etc) and we are moving these files from a source system to a cloud storage bucket. As per the architecture cloud function should get triggered on specific file extension lets say .txt when it comes to a bucket, but on the contrary, the function is triggering on every extension file which is kept in a bucket. As per my knowledge in Azure, we have function.json file where we can write extension-specific constraint but how to go forward in GCP? ( we are using python runtime )
Upvotes: 2
Views: 1490
Reputation: 5829
According to the Google Cloud Storage Triggers Documentation, there are 4 main types of triggers for Cloud Storage's Functions.
The conditions for triggering these cloud functions cannot be changed, and this means that it will indeed triggers every time an event of that type occurs and whatever conditions are needed to be checked afterwards, eg. check the file extention before executing an action, have to be checked by the cloud function itself.
Hope this helps.
Upvotes: 5