Skip to content

Commit 34cf66b

Browse files
committed
Fixed terraform formatting
1 parent fddc353 commit 34cf66b

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

data.tf

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ data "template_file" "kubeconfig" {
4848
template = "${file("${path.module}/templates/kubeconfig.tpl")}"
4949

5050
vars {
51-
cluster_name = "${var.cluster_name}"
52-
endpoint = "${aws_eks_cluster.this.endpoint}"
53-
region = "${data.aws_region.current.name}"
54-
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
55-
context_name = "${var.kubeconfig_context_name}"
56-
user_name = "${var.kubeconfig_user_name}"
51+
cluster_name = "${var.cluster_name}"
52+
endpoint = "${aws_eks_cluster.this.endpoint}"
53+
region = "${data.aws_region.current.name}"
54+
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
55+
context_name = "${var.kubeconfig_context_name}"
56+
user_name = "${var.kubeconfig_user_name}"
5757
aws_authenticator_command = "${var.kubeconfig_aws_authenticator_command}"
5858
aws_authenticator_additional_args = "${length(var.kubeconfig_aws_authenticator_additional_args) > 0 ? " - ${join("\n - ", var.kubeconfig_aws_authenticator_additional_args)}" : "" }"
5959
aws_authenticator_env_variables = "${length(var.kubeconfig_aws_authenticator_env_variables) > 0 ? " env:\n${join("\n", data.template_file.aws_authenticator_env_variables.*.rendered)}" : ""}"
@@ -65,10 +65,12 @@ data "template_file" "aws_authenticator_env_variables" {
6565
- name: $${key}
6666
value: $${value}
6767
EOF
68+
6869
count = "${length(var.kubeconfig_aws_authenticator_env_variables)}"
70+
6971
vars {
7072
value = "${element(values(var.kubeconfig_aws_authenticator_env_variables), count.index)}"
71-
key = "${element(keys(var.kubeconfig_aws_authenticator_env_variables), count.index)}"
73+
key = "${element(keys(var.kubeconfig_aws_authenticator_env_variables), count.index)}"
7274
}
7375
}
7476

variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,25 @@ variable "worker_sg_ingress_from_port" {
7676

7777
variable "kubeconfig_context_name" {
7878
description = "Name of the kubeconfig context."
79-
default = "aws"
79+
default = "aws"
8080
}
8181

8282
variable "kubeconfig_user_name" {
8383
description = "Name of the kubeconfig user."
84-
default = "aws"
84+
default = "aws"
8585
}
8686

8787
variable "kubeconfig_aws_authenticator_command" {
8888
description = "Command to use to to fetch AWS EKS credentials"
89-
default = "heptio-authenticator-aws"
89+
default = "heptio-authenticator-aws"
9090
}
9191

9292
variable "kubeconfig_aws_authenticator_additional_args" {
9393
description = "Any additional arguments to pass to the authenticator such as the role to assume [\"-r\", \"MyEksRole\"]"
94-
default = []
94+
default = []
9595
}
9696

9797
variable "kubeconfig_aws_authenticator_env_variables" {
9898
description = "Environment variables that should be used when executing the authenticator i.e. { AWS_PROFILE = \"eks\"}"
99-
default = {}
99+
default = {}
100100
}

0 commit comments

Comments
 (0)