Skip to content

Commit

Permalink
Allow to disable creation of individual fargate_profiles and eks_mana…
Browse files Browse the repository at this point in the history
…ged_node_groups map entries
  • Loading branch information
PhilippMT committed Feb 7, 2022
1 parent fd546e0 commit d2ccaba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions node_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ module "fargate_profile" {

for_each = { for k, v in var.fargate_profiles : k => v if var.create }

create = try(each.value.create, true)

# Fargate Profile
cluster_name = aws_eks_cluster.this[0].name
cluster_ip_family = var.cluster_ip_family
Expand Down Expand Up @@ -226,6 +228,8 @@ module "eks_managed_node_group" {

for_each = { for k, v in var.eks_managed_node_groups : k => v if var.create }

create = try(each.value.create, true)

cluster_name = aws_eks_cluster.this[0].name
cluster_version = try(each.value.cluster_version, var.eks_managed_node_group_defaults.cluster_version, var.cluster_version)
cluster_security_group_id = local.cluster_security_group_id
Expand Down

0 comments on commit d2ccaba

Please sign in to comment.