最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How do I impersonate a service account in Terraform to create Cloud Run v2 instances with Google Cloud Foundation Fabric? - Stac

programmeradmin3浏览0评论

I have a Terraform project using Google's Cloud Foundation Fabric modules. I have a service account that I am impersonating that has enough permissions to create the resources I have needed so far.

provider "google" {
  impersonate_service_account = "[email protected]"
}

However, when I try to the cloud-run-v2 module I get an error saying the account does not have run.services.create permissions.

The service account has roles/run.admin permission which should be enough.

Why is Cloud Run behaving differently with my impersonated service account than other modules?

I have a Terraform project using Google's Cloud Foundation Fabric modules. I have a service account that I am impersonating that has enough permissions to create the resources I have needed so far.

provider "google" {
  impersonate_service_account = "[email protected]"
}

However, when I try to the cloud-run-v2 module I get an error saying the account does not have run.services.create permissions.

The service account has roles/run.admin permission which should be enough.

Why is Cloud Run behaving differently with my impersonated service account than other modules?

Share Improve this question asked Mar 14 at 16:44 SoviutSoviut 91.9k53 gold badges209 silver badges283 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Cloud Foundation Fabric makes use of two separate google providers; one named google the other named google-beta. Certain modules like cloud-run-v2 and artifact-registry rely on google-beta. Therefore, you must impersonate the service account on both providers at once.

provider "google" {
  impersonate_service_account = "[email protected]"
}

provider "google-beta" {
  impersonate_service_account = "[email protected]"
}

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论