mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-23 18:01:04 +01:00
fix: Use splat syntax to avoid errors during destroy with an empty state (#1041)
This commit is contained in:
committed by
GitHub
parent
c75fbb0164
commit
d97edde9cd
6
local.tf
6
local.tf
@@ -146,10 +146,10 @@ locals {
|
||||
|
||||
kubeconfig = var.create_eks ? templatefile("${path.module}/templates/kubeconfig.tpl", {
|
||||
kubeconfig_name = local.kubeconfig_name
|
||||
endpoint = aws_eks_cluster.this[0].endpoint
|
||||
cluster_auth_base64 = aws_eks_cluster.this[0].certificate_authority[0].data
|
||||
endpoint = coalescelist(aws_eks_cluster.this[*].endpoint, [""])[0]
|
||||
cluster_auth_base64 = coalescelist(aws_eks_cluster.this[*].certificate_authority[0].data, [""])[0]
|
||||
aws_authenticator_command = var.kubeconfig_aws_authenticator_command
|
||||
aws_authenticator_command_args = length(var.kubeconfig_aws_authenticator_command_args) > 0 ? var.kubeconfig_aws_authenticator_command_args : ["token", "-i", aws_eks_cluster.this[0].name]
|
||||
aws_authenticator_command_args = length(var.kubeconfig_aws_authenticator_command_args) > 0 ? var.kubeconfig_aws_authenticator_command_args : ["token", "-i", coalescelist(aws_eks_cluster.this[*].name, [""])[0]]
|
||||
aws_authenticator_additional_args = var.kubeconfig_aws_authenticator_additional_args
|
||||
aws_authenticator_env_variables = var.kubeconfig_aws_authenticator_env_variables
|
||||
}) : ""
|
||||
|
||||
Reference in New Issue
Block a user