We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5583604 commit f195680Copy full SHA for f195680
main.tf
@@ -58,7 +58,7 @@ resource "aws_eks_cluster" "this" {
58
content {
59
enabled = try(compute_config.value.enabled, null)
60
node_pools = local.auto_mode_enabled ? try(compute_config.value.node_pools, []) : null
61
- node_role_arn = local.auto_mode_enabled ? try(compute_config.value.node_role_arn, aws_iam_role.eks_auto[0].arn, null) : null
+ node_role_arn = local.auto_mode_enabled && length(try(compute_config.value.node_pools, [])) > 0 ? try(compute_config.value.node_role_arn, aws_iam_role.eks_auto[0].arn, null) : null
62
}
63
64
0 commit comments