diff --git a/main.tf b/main.tf index ca0390a..1e73c76 100644 --- a/main.tf +++ b/main.tf @@ -469,7 +469,7 @@ locals { node_iam_role_arns_non_windows = distinct( compact( concat( - [for group in module.eks_managed_node_group : group.iam_role_arn], + [for group in module.eks_managed_node_group : group.iam_role_arn if group.platform != "windows"], [for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"], var.aws_auth_node_iam_role_arns_non_windows, ) @@ -479,6 +479,7 @@ locals { node_iam_role_arns_windows = distinct( compact( concat( + [for group in module.eks_managed_node_group : group.iam_role_arn if group.platform == "windows"], [for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"], var.aws_auth_node_iam_role_arns_windows, ) diff --git a/modules/eks-managed-node-group/README.md b/modules/eks-managed-node-group/README.md index bf3a359..8dcb95f 100644 --- a/modules/eks-managed-node-group/README.md +++ b/modules/eks-managed-node-group/README.md @@ -193,4 +193,5 @@ module "eks_managed_node_group" { | [node\_group\_resources](#output\_node\_group\_resources) | List of objects containing information about underlying resources | | [node\_group\_status](#output\_node\_group\_status) | Status of the EKS Node Group | | [node\_group\_taints](#output\_node\_group\_taints) | List of objects containing information about taints applied to the node group | +| [platform](#output\_platform) | Identifies if the OS platform is `bottlerocket`, `linux`, or `windows` based | diff --git a/modules/eks-managed-node-group/outputs.tf b/modules/eks-managed-node-group/outputs.tf index 012cd46..a72f27b 100644 --- a/modules/eks-managed-node-group/outputs.tf +++ b/modules/eks-managed-node-group/outputs.tf @@ -88,3 +88,12 @@ output "iam_role_unique_id" { description = "Stable and unique string identifying the IAM role" value = try(aws_iam_role.this[0].unique_id, null) } + +################################################################################ +# Additional +################################################################################ + +output "platform" { + description = "Identifies if the OS platform is `bottlerocket`, `linux`, or `windows` based" + value = var.platform +}