Skip to content

Commit c209337

Browse files
committed
Empties compute_config.node_pools when auto mode is disabled
When disabling auto mode, fixes the apply-time error: ``` │ Error: updating EKS Cluster (ex-eks-auto-mode) compute config: operation error EKS: UpdateClusterConfig, https response error StatusCode: 400, RequestID: f895a875-7bbf-4003-92e0-3aca4bc9d415, InvalidParameterException: When Compute Config nodeRoleArn is null or empty, nodePool list cannot be populated. ```
1 parent 3f50fce commit c209337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ resource "aws_eks_cluster" "this" {
6262

6363
content {
6464
enabled = compute_config.value.enabled
65-
node_pools = compute_config.value.node_pools
65+
node_pools = compute_config.value.enabled ? compute_config.value.node_pools : []
6666
node_role_arn = compute_config.value.node_pools != null ? try(aws_iam_role.eks_auto[0].arn, compute_config.value.node_role_arn) : null
6767
}
6868
}

0 commit comments

Comments
 (0)