【发布时间】:2020-08-06 04:12:34
【问题描述】:
我正在尝试在组织中的项目之间共享 GCP 中的自定义图像。
1) 项目 A
2) 项目 B
我所有的自定义图像都在项目 A 中。
我想将项目 A 的图像分享给项目 B
根据文档,我运行以下命令将图像共享到项目 B
gcloud projects add-iam-policy-binding projecta --member serviceAccount:xxxxxx@cloudservices.gserviceaccount.com --role roles/compute.imageUser
我正在使用 Terraform 来配置实例。在 terraform 中,我指定从项目 A 中获取图像。
boot_disk {
initialize_params {
image = "projects/project_A/global/images/custom_image"
}
}
我收到以下错误
Error: Error creating instance: googleapi: Error 403: Required 'compute.images.useReadOnly' permission for 'projects/project_A/global/images/custom_image', forbidden
谁能帮帮我....
【问题讨论】:
标签: google-cloud-platform google-compute-engine terraform google-cloud-iam terraform-provider-gcp