從 Google Marketplace 部署 Djangostack 失敗

從 Google Marketplace 部署 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

確保您也使用實際具有適當權限的服務帳戶。您的描述可能表明您透過錯誤的帳戶進行身份驗證沒有您需要的權限。

如果情況並非如此,請再次檢查您的權限 - 錯誤訊息清楚地表明缺少哪一項。

如果您的帳戶沒有它們 - 移至另一個點。

由於您無法直接向您需要使用的服務帳戶授予權限角色。在這種情況下,您可以例如建立新的自訂角色具有訊息中提到的權限。您可以使用安慰,雲雲實用程式(或其他方法)和授予它服務帳戶你正在使用。

相關內容