1
0
mirror of https://github.com/terraform-aws-modules/terraform-aws-eks.git synced 2025-09-09 19:32:58 +08:00

Applied create_eks to aws_auth.tf

This commit is contained in:
Tibo Beijen
2019-11-30 08:37:49 +01:00
parent 2b8394a1e4
commit 834ba13d60
+3 -3
View File
@@ -2,7 +2,7 @@ data "aws_caller_identity" "current" {
} }
data "template_file" "launch_template_worker_role_arns" { data "template_file" "launch_template_worker_role_arns" {
count = local.worker_group_launch_template_count count = var.create_eks ? local.worker_group_launch_template_count : 0
template = file("${path.module}/templates/worker-role.tpl") template = file("${path.module}/templates/worker-role.tpl")
vars = { vars = {
@@ -22,7 +22,7 @@ data "template_file" "launch_template_worker_role_arns" {
} }
data "template_file" "worker_role_arns" { data "template_file" "worker_role_arns" {
count = local.worker_group_count count = var.create_eks ? local.worker_group_count : 0
template = file("${path.module}/templates/worker-role.tpl") template = file("${path.module}/templates/worker-role.tpl")
vars = { vars = {
@@ -43,7 +43,7 @@ data "template_file" "worker_role_arns" {
} }
resource "kubernetes_config_map" "aws_auth" { resource "kubernetes_config_map" "aws_auth" {
count = var.manage_aws_auth ? 1 : 0 count = var.create_eks && var.manage_aws_auth ? 1 : 0
metadata { metadata {
name = "aws-auth" name = "aws-auth"