[英]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".假设有项目 A、B 和 C。我在项目 A 中创建了一个主题“my-topic”。现在我想让项目 B 和 C 将一些数据发布到主题“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?理想情况下,我想将项目B和C的日志数据发布到项目A中创建的主题上,这是否可能?
Give roles/pubsub.publisher
role to the Topic in Project A to the service accounts of Project B and C.将A项目中Topic的roles/pubsub.publisher
角色赋予B项目的服务账号和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 .但是,您可以将日志导出到公共位置(执行自定义/高级查询以仅获取相关的日志行)。
Is it enough for you?对你来说够了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.