从谷歌市场部署 Djangostack 失败

从谷歌市场部署 Djangostack 失败

我们尝试从 Google Marketplace 部署 Bitnami Djangostack。但是,在部署过程中我们似乎遇到了权限错误:

Error: {"ResourceType":"compute.v1.instance","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"errors":[{"domain":"global","message":"Required 'compute.instances.create' permission for 'projects/xyz/zones/asia-east1-a/instances/django-1-vm'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.disks.create' permission for 'projects/xyz/zones/asia-east1-a/disks/django-1-vm'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.subnetworks.use' permission for 'projects/xyz/regions/asia-east1/subnetworks/default'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.subnetworks.useExternalIp' permission for 'projects/xyz/regions/asia-east1/subnetworks/default'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.instances.setMetadata' permission for 'projects/xyz/zones/asia-east1-a/instances/django-1-vm'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.instances.setTags' permission for 'projects/xyz/zones/asia-east1-a/instances/django-1-vm'","reason":"forbidden"},{"domain":"global","message":"Required 'compute.instances.setServiceAccount' permission for 'projects/xyz/zones/asia-east1-a/instances/django-1-vm'","reason":"forbidden"}],"message":"Required 'compute.instances.create' permission for 'projects/xyz/zones/asia-east1-a/instances/django-1-vm'","statusMessage":"Forbidden","requestPath":"https://compute.googleapis.com/compute/v1/projects/xyz/zones/asia-east1-a/instances","httpMethod":"POST","suggestion":"Consider granting permissions to [email protected]"}}

我们已经提供了建议中提到的计算管理员权限。

答案1

确保您使用的服务帐户确实具有适当的权限。您的描述可能表明您使用错误的帐户进行身份验证没有您需要的权限。

如果不是这种情况,请再次检查您的权限 - 错误消息清楚地表明缺少哪一个。

如果您的帐户没有这些内容 - 请转到另一个点。

由于您无法直接向服务帐号授予权限,因此您需要使用角色. 在这种情况下,您可以例如创建新的自定义角色使用消息中提到的权限。您可以使用安慰云端实用性(或其他方法)和授予它服务帐户你正在使用。

相关内容