From 32738c1bcbbd8005817b6dd130f0ce0201471319 Mon Sep 17 00:00:00 2001 From: Max Xu Date: Tue, 13 May 2025 23:18:36 +0800 Subject: [PATCH] fix: conditional set env rather than null value Signed-off-by: Max Xu --- main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 875606d..b2785df 100644 --- a/main.tf +++ b/main.tf @@ -285,11 +285,11 @@ module "eks" { most_recent = true before_compute = true configuration_values = jsonencode({ - env = { + env = merge(var.enable_vpc_cni_prefix_delegation ? { # Reference docs https://docs.aws.amazon.com/eks/latest/userguide/cni-increase-ip-addresses.html - ENABLE_PREFIX_DELEGATION = var.enable_vpc_cni_prefix_delegation ? "true" : null - WARM_PREFIX_TARGET = var.enable_vpc_cni_prefix_delegation ? "1" : null - } + ENABLE_PREFIX_DELEGATION = "true" + WARM_PREFIX_TARGET = "1" + } : {}) }) } }