Create the google service account.
This commit is contained in:
@@ -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}]"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user