Skip to content

Conversation

boost-ben
Copy link

@boost-ben boost-ben commented Jul 30, 2025

Description

This PR addresses a regression introduced in v21.0.0 where the terraform-aws-eks module became incompatible with depends_on, breaking existing v20 user configurations with 'Invalid count argument' errors.

Rather than force some users to refactor their working infrastructure (without a migration path) for optimization gains they may not need, it gives users the choice to reduce the number of GET requests for partition and account_id across submodules.

Motivation and Context

Resolves #3440

Breaking Changes

No

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
    Tested with examples/eks-managed-node-group
  • I have executed pre-commit run -a on my pull request

@boost-ben boost-ben changed the title Add enable_data_source_optimizations variable fix: Add enable_data_source_optimizations variable Jul 30, 2025
@bryantbiggs
Copy link
Member

again, this is not a valid change, nor will it solve the "problem" you are claiming

the authors of the language state that you should not do this hashicorp/terraform#30340 (comment)

@andreiboost
Copy link

andreiboost commented Jul 31, 2025

I understand using depends_on is (heavily) discouraged, this whole situation reminds me of https://xkcd.com/1172/. However the truth is that something like this PR does fix planning when depends_on is used on the EKS module.

Would you consider approving a PR making the two datasources optional, by adding var.partition and var.account_id?

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 Aug 31, 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.

v21: adding depends_on to module breaks eks-managed-node-group

4 participants