From e67c9fc5a09459893ebc7960e9c40a315cc9e6f3 Mon Sep 17 00:00:00 2001 From: Aditya Choudhari <48932219+adityachoudhari26@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:11:15 -0700 Subject: [PATCH] fix: Stackdriver SA name (#148) --- modules/service_accounts/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/service_accounts/main.tf b/modules/service_accounts/main.tf index 615ab14..8db67f5 100644 --- a/modules/service_accounts/main.tf +++ b/modules/service_accounts/main.tf @@ -130,7 +130,7 @@ resource "google_service_account_iam_member" "workload_binding" { ### service account for stackdriver resource "google_service_account" "stackdriver" { count = var.enable_stackdriver == true ? 1 : 0 - account_id = substr("${random_id.main.dec}-stackdriver", 0, 30) + account_id = format("%s-stackdriver", substr(random_id.main.dec, 0, 18)) display_name = "Service Account For Workload Identity" }