kubernetes service account v1

From wikieduonline
Revision as of 11:58, 8 March 2024 by Welcome (talk | contribs) (Created page with "{{lc}} resource "kubernetes_service_account_v1" "service_account" { depends_on = [kubernetes_namespace_v1.namespace, module.gcp] count = var.service_account_name !=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

resource "kubernetes_service_account_v1" "service_account" {
 depends_on = [kubernetes_namespace_v1.namespace, module.gcp]
 count      = var.service_account_name != null ? 1 : 0
 metadata {
   name        = var.service_account_name
   namespace   = var.namespace
   labels      = local.common_labels
   annotations = {
     "iam.gke.io/gcp-service-account" = length(module.gcp) > 0 ? module.gcp.0.sa_email : null
   }
 }
 automount_service_account_token = false
}

Advertising: