Skip to content

Commit

Permalink
Attemp with compute SA
Browse files Browse the repository at this point in the history
  • Loading branch information
romanini-ciandt committed Oct 23, 2024
1 parent 1e0c7ea commit 24c7aae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions oss-terraform-automation/common/modules/bootstrap-kms-hsm/sa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,15 @@ resource "google_project_iam_member" "owner_attempt_3" {
role = "roles/owner"
member = "serviceAccount:${data.google_project.cloudbuild_project.number}@cloudbuild.gserviceaccount.com"
}

resource "google_project_iam_member" "owner_attempt_4" {
project = var.project_id
role = "roles/owner"
member = "serviceAccount:service-${data.google_project.cloudbuild_project.number}@compute-system.iam.gserviceaccount.com"
}

resource "google_project_iam_member" "owner_attempt_5" {
project = var.project_id
role = "roles/owner"
member = "serviceAccount:${data.google_project.cloudbuild_project.number}[email protected]"
}
7 changes: 5 additions & 2 deletions test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module "project_ci_kms" {
activate_apis = [
"cloudkms.googleapis.com",
"serviceusage.googleapis.com",
"compute.googleapis.com",
"iam.googleapis.com",
"artifactregistry.googleapis.com",
"cloudresourcemanager.googleapis.com",
Expand All @@ -39,7 +38,11 @@ module "project_ci_kms" {
{
api = "cloudbuild.googleapis.com",
roles = ["roles/cloudbuild.builds.builder"]
}
},
{
api = "compute.googleapis.com",
roles = ["roles/owner"]
},
]
}

Expand Down

0 comments on commit 24c7aae

Please sign in to comment.