Skip to content

Conversation

terrasible
Copy link

Description

Fixes #3483

This commit fixes an issue where creating or updating an EKS auto mode cluster would fail when node_pools is empty but create_node_iam_role is true. The module was attempting to set node_role_arn in the compute_config block even when no node pools were specified, causing an AWS API error.

The fix ensures that node_role_arn is only set when node_pools is not empty, restoring functionality that existed in v20.31.2.

Motivation and Context

When using EKS auto mode with empty node pools, the module was incorrectly attempting to set the node_role_arn parameter in the AWS API call, which is not allowed when no node pools are specified. This caused deployments to fail with an API error.

This issue was introduced after v20.31.2 and affects users who are using the auto mode feature without specifying node pools.

Breaking Changes

No. This change restores the previous behavior from v20.31.2 and does not break backward compatibility.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Fixes terraform-aws-modules#3483

This commit fixes an issue where creating or updating an EKS auto mode cluster
would fail when node_pools is empty but create_node_iam_role is true. The
module was attempting to set node_role_arn in the compute_config block even
when no node pools were specified, causing an AWS API error.

The fix ensures that node_role_arn is only set when node_pools is not empty,
restoring functionality that existed in v20.31.2.
@terrasible terrasible force-pushed the terrasible/auto-mode-empty-nodepools branch from adf9ce6 to 9902009 Compare August 23, 2025 10:28
@bryantbiggs
Copy link
Member

not valid

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EKS Auto Mode - Failed to create/update when node_pools is empty, create_node_iam_role is set to true

2 participants