From 12c13633d1f22821daef7101f4692ebf49dee851 Mon Sep 17 00:00:00 2001 From: gar Date: Tue, 21 Sep 2021 13:09:12 -0700 Subject: [PATCH] Fixing names --- .../aws/helm/kubernetes-external-secrets/helm_values.tpl.yaml | 4 ++-- .../aws/helm/kubernetes-external-secrets/main.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform-modules/aws/helm/kubernetes-external-secrets/helm_values.tpl.yaml b/terraform-modules/aws/helm/kubernetes-external-secrets/helm_values.tpl.yaml index 1080271c1..efd6c5b96 100644 --- a/terraform-modules/aws/helm/kubernetes-external-secrets/helm_values.tpl.yaml +++ b/terraform-modules/aws/helm/kubernetes-external-secrets/helm_values.tpl.yaml @@ -4,9 +4,9 @@ env: AWS_DEFAULT_REGION: us-east-1 serviceAccount: - name: kubernetes-external-secrets + name: ${resource_name} annotations: - eks.amazonaws.com/role-arn: "arn:aws:iam::${awsAccountID}:role/${iamRoleName}" + eks.amazonaws.com/role-arn: "arn:aws:iam::${awsAccountID}:role/${resource_name}" securityContext: # Required for use of IRSA, see https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html diff --git a/terraform-modules/aws/helm/kubernetes-external-secrets/main.tf b/terraform-modules/aws/helm/kubernetes-external-secrets/main.tf index a13fd9e70..1d113bc3a 100644 --- a/terraform-modules/aws/helm/kubernetes-external-secrets/main.tf +++ b/terraform-modules/aws/helm/kubernetes-external-secrets/main.tf @@ -41,7 +41,7 @@ data "template_file" "helm_values" { awsAccountID = data.aws_caller_identity.current.account_id awsRegion = data.aws_region.current.name serviceAccountName = local.k8s_service_account_name - iamRoleName = "${local.base_name}-${var.environment_name}" + resource_name = "${local.base_name}-${var.environment_name}-${var.environment_name}" } }