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:
+3
-3
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user