Skip to content

Commit

Permalink
Added namespace as a prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
amanpruthi committed Jul 11, 2024
1 parent 1a4a861 commit 20935bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/service_accounts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "google_project_iam_member" "secretmanager_admin" {
####### service account for kms and gcs cross project access
resource "google_service_account" "kms_gcs_sa" {
count = var.create_workload_identity == true ? 1 : 0
account_id = var.kms_gcs_sa_name
account_id = substr("kms-gcs-${random_id.main.hex}", 0, 30)
display_name = "Service Account For Workload Identity"
}

Expand Down Expand Up @@ -132,7 +132,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 = var.stackdriver_sa_name
account_id = substr("stackdriver-${random_id.main.hex}", 0, 30)
display_name = "Service Account For Workload Identity"
}

Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ variable "ilb_proxynetwork_cidr" {
variable "create_workload_identity" {
description = "Flag to indicate whether to create a workload identity for the service account."
type = bool
default = true
default = false
}

variable "kms_gcs_sa_name" {
Expand All @@ -305,7 +305,7 @@ variable "kms_gcs_sa_name" {

variable "enable_stackdriver" {
type = bool
default = true
default = false
}

variable "stackdriver_sa_name" {
Expand Down

0 comments on commit 20935bb

Please sign in to comment.