Google Cloud Professional Cloud Developer — Question 258
You are developing a new application. You want the application to be triggered only when a given file is updated in your Cloud Storage bucket. Your trigger might change, so your process must support different types of triggers. You want the configuration to be simple so that multiple team members can update the triggers in the future. What should you do?
Answer options
- A. Configure Cloud Storage events to be sent to Pub/Sub, and use Pub/Sub events to trigger a Cloud Build job that executes your application.
- B. Create an Eventarc trigger that monitors your Cloud Storage bucket for a specific filename, and set the target as Cloud Run.
- C. Configure a Cloud Function that executes your application and is triggered when an object is updated in Cloud Storage.
- D. Configure a Firebase function that executes your application and is triggered when an object is updated in Cloud Storage.
Correct answer: B
Explanation
The correct answer is B because Eventarc allows for flexible trigger configurations and can easily integrate with Cloud Run. Option A is incorrect as it involves additional complexity with Pub/Sub and Cloud Build, which is not necessary. Option C, while valid, does not provide the same level of trigger flexibility as Eventarc. Option D is also incorrect as Firebase functions are not the optimal choice for this use case compared to Eventarc's capabilities.