简体   繁体   中英

GCP PUB/SUB allow different projects to publish to a topic

Lets say there are Projects A, B and C. I have created a topic "my-topic" in project A. Now I want the project B and C to publish some data onto the topic "my-topic". Ideally, I want to publish the log data of project B and C onto the topic created in project A. Can this be even possible?

Give roles/pubsub.publisher role to the Topic in Project A to the service accounts of Project B and C.

You can achieve this in different manner.

Firstly, the logs have project boundaries. You can't view the logs in one place for all projects.

However you can export the logs (perform a custom/advance query to get only the relevant log lines) in a common place with the sinks .

  • Sink the logs into BigQuery to perform request and find insight in them
  • Sink the logs in PubSub for real time processing
  • Sing the logs into CLoud Storage file, for (legal) archiving
  • Sink the logs into CLoud Storage or Splunk for an external usage and ingestion.

Is it enough for you?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM