improvement: Remove dependency on external template provider (#854)

* Remove template_file for generating kubeconfig

Push logic from terraform down to the template. Makes the formatting
slightly easier to follow

* Remove template_file for generating userdata

Updates to the eks_cluster now do not trigger recreation of launch
configurations

* Remove template_file for LT userdata

* Remove template dependency
This commit is contained in:
Daniel Piddock
2020-05-06 10:54:14 +02:00
committed by GitHub
parent 25ebaab1cc
commit b183b97253
8 changed files with 108 additions and 135 deletions

View File

@@ -1,5 +1,5 @@
resource "local_file" "kubeconfig" {
count = var.write_kubeconfig && var.create_eks ? 1 : 0
content = data.template_file.kubeconfig[0].rendered
content = local.kubeconfig
filename = substr(var.config_output_path, -1, 1) == "/" ? "${var.config_output_path}kubeconfig_${var.cluster_name}" : var.config_output_path
}