mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-11 21:11:32 +01:00
clean up unused variables
This commit is contained in:
@@ -102,8 +102,6 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
|
||||
| kubeconfig_aws_authenticator_additional_args | Any additional arguments to pass to the authenticator such as the role to assume ["-r", "MyEksRole"] | string | `<list>` | no |
|
||||
| kubeconfig_aws_authenticator_command | Command to use to to fetch AWS EKS credentials | string | `heptio-authenticator-aws` | no |
|
||||
| kubeconfig_aws_authenticator_env_variables | Environment variables that should be used when executing the authenticator i.e. { AWS_PROFILE = "eks"} | string | `<map>` | no |
|
||||
| kubeconfig_context_name | Name of the kubeconfig context. | string | `aws` | no |
|
||||
| kubeconfig_user_name | Name of the kubeconfig user. | string | `aws` | no |
|
||||
| subnets | A list of subnets to place the EKS cluster and workers within. | list | - | yes |
|
||||
| tags | A map of tags to add to all resources. | string | `<map>` | no |
|
||||
| vpc_id | VPC where the cluster and workers will be deployed. | string | - | yes |
|
||||
|
||||
2
data.tf
2
data.tf
@@ -52,8 +52,6 @@ data "template_file" "kubeconfig" {
|
||||
endpoint = "${aws_eks_cluster.this.endpoint}"
|
||||
region = "${data.aws_region.current.name}"
|
||||
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
|
||||
context_name = "${var.kubeconfig_context_name}"
|
||||
user_name = "${var.kubeconfig_user_name}"
|
||||
aws_authenticator_command = "${var.kubeconfig_aws_authenticator_command}"
|
||||
aws_authenticator_additional_args = "${length(var.kubeconfig_aws_authenticator_additional_args) > 0 ? " - ${join("\n - ", var.kubeconfig_aws_authenticator_additional_args)}" : "" }"
|
||||
aws_authenticator_env_variables = "${length(var.kubeconfig_aws_authenticator_env_variables) > 0 ? " env:\n${join("\n", data.template_file.aws_authenticator_env_variables.*.rendered)}" : ""}"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
resource "local_file" "kubeconfig" {
|
||||
content = "${data.template_file.kubeconfig.rendered}"
|
||||
filename = "${var.config_output_path}/kubeconfig_eks_${data.aws_region.current.name}_${var.cluster_name}"
|
||||
filename = "${var.config_output_path}/kubeconfig_${var.cluster_name}"
|
||||
count = "${var.configure_kubectl_session ? 1 : 0}"
|
||||
}
|
||||
|
||||
resource "local_file" "config_map_aws_auth" {
|
||||
content = "${data.template_file.config_map_aws_auth.rendered}"
|
||||
filename = "${var.config_output_path}/config-map-aws-auth.yaml"
|
||||
filename = "${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml"
|
||||
count = "${var.configure_kubectl_session ? 1 : 0}"
|
||||
}
|
||||
|
||||
resource "null_resource" "configure_kubectl" {
|
||||
provisioner "local-exec" {
|
||||
command = "kubectl apply -f ${var.config_output_path}/config-map-aws-auth.yaml --kubeconfig ${var.config_output_path}/kubeconfig"
|
||||
command = "kubectl apply -f ${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}/kubeconfig_${var.cluster_name}"
|
||||
}
|
||||
|
||||
triggers {
|
||||
|
||||
10
variables.tf
10
variables.tf
@@ -79,16 +79,6 @@ variable "worker_sg_ingress_from_port" {
|
||||
default = "1025"
|
||||
}
|
||||
|
||||
variable "kubeconfig_context_name" {
|
||||
description = "Name of the kubeconfig context."
|
||||
default = "aws"
|
||||
}
|
||||
|
||||
variable "kubeconfig_user_name" {
|
||||
description = "Name of the kubeconfig user."
|
||||
default = "aws"
|
||||
}
|
||||
|
||||
variable "kubeconfig_aws_authenticator_command" {
|
||||
description = "Command to use to to fetch AWS EKS credentials"
|
||||
default = "heptio-authenticator-aws"
|
||||
|
||||
Reference in New Issue
Block a user