diff --git a/modules/eks-managed-node-group/main.tf b/modules/eks-managed-node-group/main.tf index d07c38633d..1e8b8f1508 100644 --- a/modules/eks-managed-node-group/main.tf +++ b/modules/eks-managed-node-group/main.tf @@ -224,7 +224,7 @@ resource "aws_launch_template" "this" { } dynamic "metadata_options" { - for_each = var.metadata_options != null ? [var.metadata_options] : [] + for_each = [var.metadata_options] content { http_endpoint = metadata_options.value.http_endpoint diff --git a/modules/self-managed-node-group/main.tf b/modules/self-managed-node-group/main.tf index d62bb88a02..7ee3f40e84 100644 --- a/modules/self-managed-node-group/main.tf +++ b/modules/self-managed-node-group/main.tf @@ -342,7 +342,7 @@ resource "aws_launch_template" "this" { } dynamic "metadata_options" { - for_each = var.metadata_options != null ? [var.metadata_options] : [] + for_each = [var.metadata_options] content { http_endpoint = metadata_options.value.http_endpoint