
Answer-first summary for fast verification
Answer: Create an Eventarc trigger that monitors your Cloud Storage bucket for a specific filename, and set the target as Cloud Run.
The question requires a solution that allows the application to be triggered by Cloud Storage updates while supporting future changes to the trigger type with simple configuration. Eventarc (Option B) is designed to decouple event sources from targets, enabling flexible trigger management. By creating an Eventarc trigger that monitors the Cloud Storage bucket and targets Cloud Run, the setup becomes adaptable: if the trigger type changes (e.g., from Cloud Storage to Pub/Sub), only the Eventarc configuration needs updating, not the application code. This approach simplifies future modifications and aligns with Infrastructure as Code practices, making it easier for team members to manage. Options C and D (Cloud/Firebase Functions) tie the trigger directly to the function, reducing flexibility. Option A introduces unnecessary complexity with Pub/Sub and Cloud Build, which is not ideal for application execution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can you configure a Cloud Storage trigger for your application that activates only when a specific file is updated, while ensuring the solution is flexible enough to accommodate future trigger changes and maintain simplicity for team members to modify?
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.