dumb_coder
dumb_coder

Reputation: 325

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?

Upvotes: 1

Views: 1973

Answers (2)

guillaume blaquiere
guillaume blaquiere

Reputation: 75715

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?

Upvotes: 3

Vikram Shinde
Vikram Shinde

Reputation: 1028

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

Upvotes: 6

Related Questions