0

In GCP, I have a log sink which centralizes logs onto a GCP Project. I also have an EventArc trigger that listens for Cloud Resource Manager events, specifically the createProject method

EventArc Trigger

Are Eventarc triggers limited to only the current projects logs? Or can it access all logs from all logs bucket in a GCP Project

The logs show up in Cloud Logging (only when I set the scope to include all buckets and not limit it to the current project), however no Eventarc triggers are generated off of this.

Cloud Logging

Is this a limitation of Eventarc or am I missing something here?

tHappy
  • 91
  • 8
  • Your use case is interesting? Do you agree to share it with the Eventarc PM at Google Cloud? – guillaume blaquiere Jul 14 '22 at 21:05
  • Sure. I reached out to a Google Developer Advocate and they told me that EventArc works on a single project. While there are ways to setup cross project event routing through eventarc, a few things need to be setup and configured before the routing happens. https://cloud.google.com/blog/topics/developers-practitioners/cross-region-and-cross-project-event-routing-eventarc-and-pubsub – tHappy Jul 16 '22 at 06:30
  • Reach me out by email or twitter. And I agree with the dev advocate: for now, it's not possible. But the product evolve quickly and the PM is looking for user use cases to prioritize things, and your use case can be important for him! – guillaume blaquiere Jul 16 '22 at 14:53
  • 1
    @tHappy Could you post your solution as an answer so that others could spot the workaround easier? – Sathi Aiswarya Aug 02 '22 at 13:31

1 Answers1

0

Since the createProject method is among the very first logs that gets generated in a newly created project, EventArc triggers will NOT pick them up since the trigger would have to be created after the project has been created. Triggers might take a few minutes to become active before they can process logs.

In my case, I was able to create a Logs Router at an organization / folder level to overcome this issue, the Logs Router would include all child elements and would capture specific logs from the Cloud Resource Manager.

tHappy
  • 91
  • 8