From 3f346d16109c4bc53fe256fcaae6bc08613d1173 Mon Sep 17 00:00:00 2001 From: Miguel Ferreira Date: Thu, 24 Oct 2019 18:13:06 +0200 Subject: [PATCH] Remove region from vars mapping for kubeconfig (#556) The template file data source was injecting a region variable that is not defined in the template. Once removed the variable the aws region data source was not used anywhere else, so it is removed as well. --- data.tf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/data.tf b/data.tf index 57bcad7..1a28e25 100644 --- a/data.tf +++ b/data.tf @@ -2,9 +2,6 @@ locals { worker_ami_name_filter = var.worker_ami_name_filter != "" ? var.worker_ami_name_filter : "amazon-eks-node-${var.cluster_version}-v*" } -data "aws_region" "current" { -} - data "aws_iam_policy_document" "workers_assume_role_policy" { statement { sid = "EKSWorkerAssumeRole" @@ -52,7 +49,6 @@ data "template_file" "kubeconfig" { vars = { kubeconfig_name = local.kubeconfig_name endpoint = aws_eks_cluster.this.endpoint - region = data.aws_region.current.name cluster_auth_base64 = aws_eks_cluster.this.certificate_authority[0].data aws_authenticator_command = var.kubeconfig_aws_authenticator_command aws_authenticator_command_args = length(var.kubeconfig_aws_authenticator_command_args) > 0 ? " - ${join(