【问题标题】:Not able to delete cloud composer environment无法删除云作曲家环境
【发布时间】:2022-07-22 17:15:10
【问题描述】:

当尝试删除我的云作曲家环境时,它会因为权限不足而卡住。根据这篇文章,我已经删除了存储桶、GKE 集群和部署: Cannot delete Cloud Composer environment

服务帐号是标准的计算 SA。

DELETE operation on this environment failed 33 minutes ago with the following error message:
Could not configure workload identity: Permission iam.serviceAccounts.getIamPolicy is required to perform this operation on service account projects/-/serviceAccounts/"project-id"-compute@developer.gserviceaccount.com.

即使我暂时将计算帐户设为项目所有者和 IAM 安全管理员,它也不起作用。 我试图通过 GUI、gcloud CLI 和 terraform 删除它,但没有成功。任何建议或尝试的东西都将不胜感激:)

【问题讨论】:

    标签: google-cloud-platform permissions identity-management


    【解决方案1】:

    问题 iam.serviceAccounts.getIamPolicy 似乎与凭据更相关,即您的服务器在检索凭据数据时遇到问题。

    您应该再次设置路径凭据变量:

    export GOOGLE_APPLICATION_CREDENTIALS=fullpath.json
    

    您还可以尝试运行其他选项:

    gcloud auth activate-service-account
    

    您也可以将其添加到您的脚本中:

    provider "google" {
      credentials = file(var.service_account_file_path)
      project     = var.project_id
    }
    

    不要忘记您需要拥有正确的角色才能删除作曲家。

    有关它的更多详细信息,您可以查看:

    https://cloud.google.com/composer/docs/delete-environments#gcloud

    https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/composer_environment

    https://cloud.google.com/composer/docs/how-to/access-control?hl=es_419

    【讨论】:

    • 感谢您的回答!不幸的是,我确实尝试过但没有成功。
    【解决方案2】:

    我得到了谷歌支持的帮助,而不是向 SA projects/-/serviceAccounts/"project-id"-compute@developer.gserviceaccount.com. 发送地址

    显然是默认服务 agent 的格式为 service-"project-nr"@cloudcomposer-accounts.iam.gserviceaccount.comCloud Composer v2 API Service Agent Extension

    感谢您的友好回复!

    【讨论】:

      猜你喜欢
      • 2021-03-08
      • 2021-11-14
      • 2020-11-28
      • 1970-01-01
      • 2016-03-26
      • 1970-01-01
      • 1970-01-01
      • 2014-03-05
      • 2017-08-13
      相关资源
      最近更新 更多