mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-18 23:43:49 +01:00
fix: Revert removal of templates provider (#883)
Broke use case of passing in custom template content. Reverts most of the following PRs: - #865 - #863 - #854
This commit is contained in:
88
local.tf
88
local.tf
@@ -147,92 +147,4 @@ locals {
|
||||
aws_authenticator_additional_args = var.kubeconfig_aws_authenticator_additional_args
|
||||
aws_authenticator_env_variables = var.kubeconfig_aws_authenticator_env_variables
|
||||
}) : ""
|
||||
|
||||
userdata = [for worker in var.worker_groups : templatefile(
|
||||
lookup(
|
||||
worker,
|
||||
"userdata_template_file",
|
||||
lookup(worker, "platform", local.workers_group_defaults["platform"]) == "windows"
|
||||
? "${path.module}/templates/userdata_windows.tpl"
|
||||
: "${path.module}/templates/userdata.sh.tpl"
|
||||
),
|
||||
merge(
|
||||
{
|
||||
platform = lookup(worker, "platform", local.workers_group_defaults["platform"])
|
||||
cluster_name = aws_eks_cluster.this[0].name
|
||||
endpoint = aws_eks_cluster.this[0].endpoint
|
||||
cluster_auth_base64 = aws_eks_cluster.this[0].certificate_authority[0].data
|
||||
pre_userdata = lookup(
|
||||
worker,
|
||||
"pre_userdata",
|
||||
local.workers_group_defaults["pre_userdata"],
|
||||
)
|
||||
additional_userdata = lookup(
|
||||
worker,
|
||||
"additional_userdata",
|
||||
local.workers_group_defaults["additional_userdata"],
|
||||
)
|
||||
bootstrap_extra_args = lookup(
|
||||
worker,
|
||||
"bootstrap_extra_args",
|
||||
local.workers_group_defaults["bootstrap_extra_args"],
|
||||
)
|
||||
kubelet_extra_args = lookup(
|
||||
worker,
|
||||
"kubelet_extra_args",
|
||||
local.workers_group_defaults["kubelet_extra_args"],
|
||||
)
|
||||
},
|
||||
lookup(
|
||||
worker,
|
||||
"userdata_template_extra_args",
|
||||
local.workers_group_defaults["userdata_template_extra_args"]
|
||||
)
|
||||
)
|
||||
) if var.create_eks
|
||||
]
|
||||
|
||||
launch_template_userdata = [for worker in var.worker_groups_launch_template : templatefile(
|
||||
lookup(
|
||||
worker,
|
||||
"userdata_template_file",
|
||||
lookup(worker, "platform", local.workers_group_defaults["platform"]) == "windows"
|
||||
? "${path.module}/templates/userdata_windows.tpl"
|
||||
: "${path.module}/templates/userdata.sh.tpl"
|
||||
),
|
||||
merge(
|
||||
{
|
||||
platform = lookup(worker, "platform", local.workers_group_defaults["platform"])
|
||||
cluster_name = aws_eks_cluster.this[0].name
|
||||
endpoint = aws_eks_cluster.this[0].endpoint
|
||||
cluster_auth_base64 = aws_eks_cluster.this[0].certificate_authority[0].data
|
||||
pre_userdata = lookup(
|
||||
worker,
|
||||
"pre_userdata",
|
||||
local.workers_group_defaults["pre_userdata"],
|
||||
)
|
||||
additional_userdata = lookup(
|
||||
worker,
|
||||
"additional_userdata",
|
||||
local.workers_group_defaults["additional_userdata"],
|
||||
)
|
||||
bootstrap_extra_args = lookup(
|
||||
worker,
|
||||
"bootstrap_extra_args",
|
||||
local.workers_group_defaults["bootstrap_extra_args"],
|
||||
)
|
||||
kubelet_extra_args = lookup(
|
||||
worker,
|
||||
"kubelet_extra_args",
|
||||
local.workers_group_defaults["kubelet_extra_args"],
|
||||
)
|
||||
},
|
||||
lookup(
|
||||
worker,
|
||||
"userdata_template_extra_args",
|
||||
local.workers_group_defaults["userdata_template_extra_args"]
|
||||
)
|
||||
)
|
||||
) if var.create_eks
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user