将无服务器VPC连接器连接到主机项目中云的权限问题
我在项目X
中有一个需要访问VM实例的服务,我允许使用无服务器VPC连接器(在A host 项目中创建)访问该实例。 。我的问题是,在跟随 this 指南是有指南在云运行中部署新的修订时(在A service 项目中运行)时,似乎是一个权限问题:
请确保项目的服务代理具有权限[VPCACCESS.CONNECTORS.USE]用于在资源项目上进行操作连接/.../ Connector
I have a service in Cloud Run in project x
that needs to access a VM instance, which I am allowing access to using a serverless VPC connector (created in a host project). My problem, while following this guide is that there appears to be a permission issue when deploying a new revision in Cloud Run (running in a service project):
Please ensure the project's service agent has the permission [vpcaccess.connectors.use] for action Connect on resource projects/.../connector
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仔细阅读找到的文档此处,特别是
回顾错误消息,似乎建议
cloud Run
服务帐户在访问主机项目中的VPC连接器时遇到了困难。因此,通过添加服务项目的云运行服务帐户在主机项目的IAM页面中使用>无服务器vpc access Viewer
许可,Cloud Run的服务帐户能够访问外部项目中的连接器,我能够使用无服务器共享的VPC连接器成功重新运行云。请注意,一旦添加此权限,在
iam
页面中,名称应该说“ Google Cloud Run Service Agent for ProjectService-Project-ID
”。It is very important to closely read the documentation found here, specifically this portion:
Looking back at the error message, it seems to suggest that the
Cloud Run
service account is having trouble accessing the VPC connector in the host project. So, by adding the Cloud Run service account from the service project in the host project's IAM page with theServerless VPC Access Viewer
permission, Cloud Run's service account was able to access the connector in an outside project, and I was able to successfully re-deploy Cloud Run using the serverless shared VPC connector.Note that once you add this permission, in the
IAM
page the name should say something like "Google Cloud Run Service Agent for ProjectSERVICE-PROJECT-ID
".