File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -100,9 +100,12 @@ resource "google_project_iam_member" "preflight_agent_cluster_viewer" {
100100
101101# if using workload identity in GKE, use the following binding to allow the
102102# agent to use the service account
103- resource "google_project_iam_binding " "preflight_agent_workload_identity" {
104- project = var.project_id
103+ resource "google_service_account_iam_binding " "preflight_agent_workload_identity" {
104+ service_account_id = google_service_account.preflight_agent_service_account.name
105105 role = "roles/iam.workloadIdentityUser"
106- members = "serviceAccount:${var.project_id}.svc.id.goog[preflight/default]"
106+ members = [ "serviceAccount:${var.project_id}.svc.id.goog[preflight/agent]"]
107107}
108108```
109+
110+ An annotation specifing the gcp service account must be added to the agent's k8s service account
111+ ` iam.gke.io/gcp-service-account=<gsa_name>@<gsa_project.iam.gserviceaccount.com> `
You can’t perform that action at this time.
0 commit comments