【问题标题】:how to update GCP Buckets ACLs using terraform?如何使用 terraform 更新 GCP Buckets ACL?
【发布时间】:2020-05-26 10:28:24
【问题描述】:

我无法使用 terraform 更新存储桶 ACL。我收到下面提到的错误:-

检索当前 ACL 时出错:googleapi:错误 403:@appspot.gserviceaccount.com 没有 storage.buckets.get 访问权限,禁止

但如果我尝试使用 GCP CLI 添加 ACL,它会起作用。

谁能告诉我是什么问题?

【问题讨论】:

    标签: google-cloud-platform terraform-provider-gcp


    【解决方案1】:

    根据错误消息,默认 App Engine 服务帐户 PROJECT_ID@appspot.gserviceaccount.com 似乎缺少 storage.buckets.get 权限。

    在您使用 GCP CLI 添加 ACL 后,您是否尝试为您的应用重新启用 API?

    这些链接Cloud IAM permissions for the Google Cloud ConsoleGranting roles to service accounts 供您考虑。

    【讨论】:

    • 我是该组的所有者,这意味着如果问题出现,我拥有所有权限,为什么它没有随 GCP CLI 出现,而​​仅随 terraform 出现
    • @Mukul 当您使用 gCloudSDK 并对其进行身份验证时,您使用自己的凭据,正如您所提到的,您是项目所有者。当您尝试使用 terraform 进行更改时,会使用 Service Account 来代替,这没有正确设置权限,这就是区别。你能试试威廉所说的并分享结果吗?
    猜你喜欢
    • 2023-01-16
    • 2017-10-04
    • 2020-10-12
    • 2022-11-21
    • 2020-07-28
    • 2022-11-17
    • 1970-01-01
    • 2020-01-19
    • 2019-02-16
    相关资源
    最近更新 更多