创建google cloud storage notification 的权限问题

问题

根据google 的文档:
https://cloud.google.com/storage/docs/reporting-changes#command-line

明确表示, 要创建storage notificaiton , 创建者(or service account) 只需要bucket 和 pubsub admin roles

在这里插入图片描述
但是实际上我在公司尝试为1个bucket 创建 notification 时遇到了错误:


ERROR: (gcloud.storage.buckets.notifications.create) User [xxxxx] does not have permission to access b instance [xxxx] (or it may not exist): 
xxxxx does not have serviceusage.services.use access to the Google Cloud project. Permission 'serviceusage.services.use' denied on resource (or it may not exist). This command is authenticated as xxxxx which is the active account specified by the [core/account] property.

首先什么是b instance, serviceusage.services.us 又是什么权限

由于我在公司所用的账号是terraform用的账号, 权限我相信是足够的, 也具有pubsub 和 bucket admin 的roles.

而且这个账号之前是创建过其他notification的

尝试几次后, 够钟收工






尝试在家里reproduce 这个issue

首先创建 1个service account, 并且分配权限

account name 就叫 pubsub-bucket-adm

tf 脚本:

# create a resource for a new service account
resource "google
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

nvd11

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值