From 94b6a187e035d0e857796f9d01e3ba755e23dacd Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 18 Jul 2021 17:04:51 -0400 Subject: [PATCH] Add an output for the generated service account. --- .../workload_identity_account/workload_identity_account.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/modules/workload_identity_account/workload_identity_account.tf b/terraform/modules/workload_identity_account/workload_identity_account.tf index c79e3ce..81705ca 100644 --- a/terraform/modules/workload_identity_account/workload_identity_account.tf +++ b/terraform/modules/workload_identity_account/workload_identity_account.tf @@ -18,6 +18,11 @@ variable "k8s_service_account" { type = string } +output "service_account" { + description = "The google_service_account that has been bound to the kubernetes service account." + value = google_service_account.service_account +} + 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}]"