@@ -356,21 +356,33 @@ resource "aws_eks_identity_provider_config" "this" {
356
356
# ###############################################################################
357
357
358
358
locals {
359
- node_iam_role_arns_non_windows = compact (concat (
360
- [for group in module . eks_managed_node_group : group . iam_role_arn ],
361
- [for group in module . self_managed_node_group : group . iam_role_arn if group . platform != " windows" ],
362
- var. aws_auth_node_iam_role_arns_non_windows ,
363
- ))
364
-
365
- node_iam_role_arns_windows = compact (concat (
366
- [for group in module . self_managed_node_group : group . iam_role_arn if group . platform == " windows" ],
367
- var. aws_auth_node_iam_role_arns_windows ,
368
- ))
369
-
370
- fargate_profile_pod_execution_role_arns = compact (concat (
371
- [for group in module . fargate_profile : group . fargate_profile_pod_execution_role_arn ],
372
- var. aws_auth_fargate_profile_pod_execution_role_arns ,
373
- ))
359
+ node_iam_role_arns_non_windows = distinct (
360
+ compact (
361
+ concat (
362
+ [for group in module . eks_managed_node_group : group . iam_role_arn ],
363
+ [for group in module . self_managed_node_group : group . iam_role_arn if group . platform != " windows" ],
364
+ var. aws_auth_node_iam_role_arns_non_windows ,
365
+ )
366
+ )
367
+ )
368
+
369
+ node_iam_role_arns_windows = distinct (
370
+ compact (
371
+ concat (
372
+ [for group in module . self_managed_node_group : group . iam_role_arn if group . platform == " windows" ],
373
+ var. aws_auth_node_iam_role_arns_windows ,
374
+ )
375
+ )
376
+ )
377
+
378
+ fargate_profile_pod_execution_role_arns = distinct (
379
+ compact (
380
+ concat (
381
+ [for group in module . fargate_profile : group . fargate_profile_pod_execution_role_arn ],
382
+ var. aws_auth_fargate_profile_pod_execution_role_arns ,
383
+ )
384
+ )
385
+ )
374
386
375
387
aws_auth_configmap_data = {
376
388
mapRoles = yamlencode (concat (
0 commit comments