错误403:terraformproject所需的"compute.zones.get"权限 [英] Error 403: Required 'compute.zones.get' permission for a terraformproject

查看:146
本文介绍了错误403:terraformproject所需的"compute.zones.get"权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

J添加了所有角色.我仍然无法获得用于构建项目的terraform.

J added all the roles.I still cannot get terraform to build the project.

googlecompute:创建实例时出错:googleapi:错误403:'pr必需的'compute.zones.get'权限ojects/terraform-3/zones/us-central1',禁止构建"googlecompute"错误:创建实例时出错:googleapi:错误403:必填的"compute.zones.get"权限'projects/terraform-3/zones/us-central1',禁止

googlecompute: Error creating instance: googleapi: Error 403: Required 'compute.zones.get' permission for 'pr ojects/terraform-3/zones/us-central1', forbidden Build 'googlecompute' errored: Error creating instance: googleapi: Error 403: Required 'compute.zones.get' permis sion for 'projects/terraform-3/zones/us-central1', forbidden

推荐答案

如果以某种方式将您的cloudservices机器人作为项目编辑器删除,则可能会出现这种问题.我最好的猜测是,就您而言,这就是问题所在.

This sort of issue might arise if somehow your cloudservices robot gets removed as a project editor. My best guess is that in your case this is the issue.

这可能是由于具有SetIamPolicy的API调用从角色/编辑器"绑定中丢失了cloudservices机械手而导致的.SetIamPolicy是一个直接的PUT,它将使用请求中提供的任何策略覆盖.您可以使用以下命令通过已在本文中给出.

This might happen due to API call which has SetIamPolicy that is missing cloudservices robot from the "roles/editor" bindings. SetIamPolicy is a straight PUT, it will override with whatever policy is provided in the request. You can get the list of IAM policies for your project with below command as given in this article.

gcloud projects get-iam-policy [project-id]

从列表中,您可以检查以下服务帐户是否具有编辑权限.

From the list, you can check whether below service account has the editor permission or not.

要解决此问题,您可以授予上述服务帐户 编辑者" 权限,然后检查是否可以解决该问题.

To fix the issue, you can grant the mentioned service account "Editor" permission and check whether that solves the issue or not.

[id] @ cloudservices.gserviceaccount.com

[id]@cloudservices.gserviceaccount.com

这篇关于错误403:terraformproject所需的"compute.zones.get"权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆