1
我正在嘗試使用GCP部署管理器創建存儲桶。我已經通過快速入門指南並能夠創建一個compute.v1.instance
。但我試圖在Google雲端存儲中創建一個存儲桶,但無法獲得除403 Forbidden
以外的其他任何內容。使用Google雲端平臺部署管理器模板創建存儲桶
這就是我的模板文件的樣子。
resources:
- type: storage.v1.bucket
name: test-bucket
properties:
project: my-project
name: test-bucket-name
這是我打電話
gcloud deployment-manager deployments create deploy-test --config deploy.yml
而這就是我收到回
Waiting for create operation-1474738357403-53d4447edfd79-eed73ce7-cabd72fd...failed.
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation operation-1474738357403-53d4447edfd79-eed73ce7-cabd72fd: <ErrorValue
errors: [<ErrorsValueListEntry
code: u'RESOURCE_ERROR'
location: u'deploy-test/test-bucket'
message: u'Unexpected response from resource of type storage.v1.bucket: 403 {"code":403,"errors":[{"domain":"global","message":"Forbidden","reason":"forbidden"}],"message":"Forbidden","statusMessage":"Forbidden","requestPath":"https://www.googleapis.com/storage/v1/b/test-bucket"}'>]>
我有憑據的設置,我甚至創造了一個帳戶擁有者設定憑據(可以訪問所有內容),我仍然得到這個迴應。
任何想法或好的地方看?是我的配置還是需要在我的請求中傳遞額外的憑據?
我來自AWS背景,仍然找到了圍繞GCP的方法。
謝謝
我只是爲這篇文章做了這個通用。我正在使用一個獨特的名字。名稱的唯一性將不會返回403. – stu
您是否檢查了正確的名稱約定(在此列出(https://cloud.google.com/storage/docs/naming))? [有關錯誤代碼的Google雲端存儲文檔](https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden)表示您無權進行此調用。您是否嘗試使用[雲端控制檯](https://console.cloud.google.com/)製作同一個存儲分區? – Fematich
感謝您的耐心等待。你是對的,我使用了'tf-composite-frontend-angular'這個名字,我認爲這是一個充分的獨特性組合。我只是試圖手動創建它,並沒有說它不是唯一的。所以我附加了一個'-1',它可以工作。再次感謝。 (嘆) – stu