From bd4bda266e23635c7ca09b6e9d307b29ef6b8579 Mon Sep 17 00:00:00 2001 From: Lama <9804647+Lamaspanzer@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:41:24 +0100 Subject: [PATCH] fix: Correct key used on `license_configuration_arn` (#2796) fix: Reference to undeclared resource Co-authored-by: Lamaspanzer --- modules/eks-managed-node-group/main.tf | 4 ++-- modules/self-managed-node-group/main.tf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/eks-managed-node-group/main.tf b/modules/eks-managed-node-group/main.tf index 1d3fe81..14c9b48 100644 --- a/modules/eks-managed-node-group/main.tf +++ b/modules/eks-managed-node-group/main.tf @@ -176,10 +176,10 @@ resource "aws_launch_template" "this" { key_name = var.key_name dynamic "license_specification" { - for_each = length(var.license_specifications) > 0 ? var.license_specifications : {} + for_each = length(var.license_specifications) > 0 ? var.license_specifications : [] content { - license_configuration_arn = license_specifications.value.license_configuration_arn + license_configuration_arn = license_specification.value.license_configuration_arn } } diff --git a/modules/self-managed-node-group/main.tf b/modules/self-managed-node-group/main.tf index e29e52a..5dc1bcc 100644 --- a/modules/self-managed-node-group/main.tf +++ b/modules/self-managed-node-group/main.tf @@ -282,10 +282,10 @@ resource "aws_launch_template" "this" { key_name = var.key_name dynamic "license_specification" { - for_each = length(var.license_specifications) > 0 ? var.license_specifications : {} + for_each = length(var.license_specifications) > 0 ? var.license_specifications : [] content { - license_configuration_arn = license_specifications.value.license_configuration_arn + license_configuration_arn = license_specification.value.license_configuration_arn } }