resource "google_project_service_identity" "healthcare_identity" {
project = "foo"
service = "healthcare.googleapis.com"
}
gcloud command: https://cloud.google.com/sdk/gcloud/reference/beta/services/identity/create
This is the relevant API.
https://cloud.google.com/service-usage/docs/reference/rest/v1beta1/services/generateServiceIdentity
b/165640832
We really need this feature as Composer service account use to be part of enabling the service. Recently they changed the behavior and it is not created as part of enabling composer service. It can be enabled by running gcloud beta services identity create --service=composer.googleapis.com
@c2thorn I am looking into adding support for this in magic modules. Thanks!
If anyone wants to use this immediately, an initial version of the resource is available at https://github.com/hashicorp/terraform-provider-google-beta/pull/2430.
I verified correctness with the following config:
data "google_project" "project" {
project_id = "REPLACE"
}
resource "google_project_service_identity" "healthcare" {
provider = "google-beta"
project = data.google_project.project.project_id
service = "healthcare.googleapis.com"
}
resource "google_project_iam_member" "bq_jobuser" {
project = data.google_project.project.project_id
role = "roles/bigquery.jobUser"
member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-healthcare.iam.gserviceaccount.com"
}
Thanks. Any ETA when it will be available?
@imrannayer google providers are released on a weekly basis, but if you need it sooner you can clone the repo and run go build to build the provider yourself (and move the binary to the same dir as the deployment or a central one).
FYI - for more details/background explained by a Google engineer (afaik), see https://github.com/terraform-google-modules/terraform-google-project-factory/issues/448#issuecomment-683468418
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
We really need this feature as Composer service account use to be part of enabling the service. Recently they changed the behavior and it is not created as part of enabling composer service. It can be enabled by running gcloud beta services identity create --service=composer.googleapis.com