Create the google service account.

This commit is contained in:
Tom Alexander
2021-07-18 17:03:14 -04:00
parent 06b787ef97
commit e17e2f24a7
2 changed files with 19 additions and 2 deletions

View File

@@ -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}]"
}