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