Create the google service account.
This commit is contained in:
parent
06b787ef97
commit
e17e2f24a7
@ -110,6 +110,7 @@ module "cloudsql" {
|
||||
module "cloudsql_test_sa" {
|
||||
source = "../modules/workload_identity_account"
|
||||
project = var.project
|
||||
k8s_service_account = "test-sa"
|
||||
}
|
||||
|
||||
#################### Redis ################################
|
||||
|
@ -6,3 +6,19 @@ variable "project" {
|
||||
description = "Project ID."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "k8s_namespace" {
|
||||
description = "Name of the kubernetes namespace containing the service account."
|
||||
type = string
|
||||
default = "default"
|
||||
}
|
||||
|
||||
variable "k8s_service_account" {
|
||||
description = "Service account name from kubernetes."
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "google_service_account" "service_account" {
|
||||
account_id = "wi-${var.k8s_namespace}-${var.k8s_service_account}"
|
||||
display_name = "Workload identity account for GKE [${var.k8s_namespace}/${var.k8s_service_account}]"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user