From 4f8a8480de293e00d3e5d1a0371a649270f70920 Mon Sep 17 00:00:00 2001 From: Glaaj <83582518+Glaaj@users.noreply.github.com> Date: Tue, 14 Jun 2022 13:10:30 +0200 Subject: [PATCH] Add automounting of the serviceaccount token This is an optional boolean, on newer versions of terraform and the kubernetes provider this default to `true`. However older versions don't have this set to true and therefore default to `false` This ultimately result in deployments failing due to them not being able to find the token. By setting it to `true` we can ensure it's mounted no matter what version of terraform and kubernetes provider is used. --- k8s-resources.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/k8s-resources.tf b/k8s-resources.tf index 8955e0d..8d55f94 100644 --- a/k8s-resources.tf +++ b/k8s-resources.tf @@ -55,4 +55,5 @@ resource "kubernetes_service_account" "alb_ingress_controller" { "eks.amazonaws.com/role-arn" = "arn:aws:iam::${var.account_id}:role/${aws_iam_role.alb-ingress-controller-iam-role.name}" } } + automount_service_account_token = true }