Skip to content

Commit

Permalink
fix: restore Workload Identity GSA resource name (terraform-google-mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb committed Jul 23, 2021
1 parent 880a457 commit b5095c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/workload-identity/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ locals {

data "google_service_account" "cluster_service_account" {
# This will cause Terraform to block looking up details until the service account is created
account_id = var.use_existing_gcp_sa ? local.gcp_given_name : google_service_account.main[0].account_id
account_id = var.use_existing_gcp_sa ? local.gcp_given_name : google_service_account.cluster_service_account[0].account_id
project = var.project_id
}

resource "google_service_account" "main" {
resource "google_service_account" "cluster_service_account" {
count = var.use_existing_gcp_sa ? 0 : 1

account_id = local.gcp_given_name
Expand Down

0 comments on commit b5095c6

Please sign in to comment.