Skip to content

eks: Add support for enabling / disabling EKS Hybrid Nodes on existing clusters#42928

Merged
ewbankkit merged 5 commits into
hashicorp:mainfrom
raglin:f-aws_eks_hybrid_node_existing_cluster
Aug 25, 2025
Merged

eks: Add support for enabling / disabling EKS Hybrid Nodes on existing clusters#42928
ewbankkit merged 5 commits into
hashicorp:mainfrom
raglin:f-aws_eks_hybrid_node_existing_cluster

Conversation

@raglin
Copy link
Copy Markdown
Contributor

@raglin raglin commented Jun 9, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Description

This enhancement allows users to modify remote node and pod network CIDRs without recreating their EKS clusters. The implementation includes:

  • Remove ForceNew constraint from remote_network_config fields to allow updates without cluster recreation
  • Add update logic for remote_node_networks and remote_pod_networks in resourceClusterUpdate
  • Split expand functions into separate create and update variants to handle different update scenarios
  • Remove Computed attribute from remote_pod_networks
  • Add test coverage for remote network config updates including node-only and pod network scenarios
  • Ensure proper handling of empty network configurations during updates

Relations

Closes #42552

References

Amazon EKS UpdateClusterConfig API

Output from Acceptance Testing

$ make testacc TESTS=TestAccEKSCluster_Remote PKG=eks
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.9 test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSCluster_Remote'  -timeout 360m -vet=off
2025/06/09 19:02:11 Initializing Terraform AWS Provider...
=== RUN   TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== RUN   TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
=== RUN   TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== RUN   TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== CONT  TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== CONT  TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== CONT  TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== CONT  TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
--- PASS: TestAccEKSCluster_RemoteNetwork_Pod_OnCreate (500.73s)
--- PASS: TestAccEKSCluster_RemoteNetwork_Node_OnCreate (504.15s)
--- PASS: TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate (1270.23s)
--- PASS: TestAccEKSCluster_RemoteNetwork_Node_OnUpdate (1288.43s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/eks        1288.568s

…g clusters

This enhancement allows users to modify remote node and pod network CIDRs without recreating their EKS clusters.. The implementation includes:

- Remove ForceNew constraint from remote_network_config fields to allow updates without cluster recreation
- Add update logic for remote_node_networks and remote_pod_networks in resourceClusterUpdate
- Split expand functions into separate create and update variants to handle different update scenarios
- Remove Computed attribute from remote_pod_networks
- Add test coverage for remote network config updates including node-only and pod network scenarios
- Ensure proper handling of empty network configurations during updates
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 9, 2025

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions Bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/eks Issues and PRs that pertain to the eks service. size/L Managed by automation to categorize the size of a PR. labels Jun 9, 2025
@raglin raglin marked this pull request as ready for review June 9, 2025 19:39
@raglin raglin requested a review from a team as a code owner June 9, 2025 19:39
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 12, 2025
@CAR6807
Copy link
Copy Markdown

CAR6807 commented Jul 14, 2025

Any progress on this?

@CAR6807
Copy link
Copy Markdown

CAR6807 commented Jul 14, 2025

Any update on this?

@raglin
Copy link
Copy Markdown
Contributor Author

raglin commented Jul 31, 2025

we're still awaiting a review from the maintainers, the PR needs more votes to be prioritized.
apologies for tagging you directly @justinretzolk, any chance we could get someone's eyes to review this?

@breathingdust breathingdust added the partner Contribution from a partner. label Aug 5, 2025
@ewbankkit ewbankkit self-assigned this Aug 23, 2025
@github-actions github-actions Bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 23, 2025
Copy link
Copy Markdown
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccEKSCluster_' PKG=eks 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/eks/... -v -count 1 -parallel 20  -run=TestAccEKSCluster_ -timeout 720m -vet=off
2025/08/23 16:56:56 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/23 16:56:56 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccEKSCluster_basic
=== PAUSE TestAccEKSCluster_basic
=== RUN   TestAccEKSCluster_disappears
=== PAUSE TestAccEKSCluster_disappears
=== RUN   TestAccEKSCluster_AccessConfig_create
=== PAUSE TestAccEKSCluster_AccessConfig_create
=== RUN   TestAccEKSCluster_AccessConfig_update
=== PAUSE TestAccEKSCluster_AccessConfig_update
=== RUN   TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== PAUSE TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== RUN   TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
=== PAUSE TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
=== RUN   TestAccEKSCluster_ComputeConfig_OnCreate
=== PAUSE TestAccEKSCluster_ComputeConfig_OnCreate
=== RUN   TestAccEKSCluster_ComputeConfig_OnUpdate
=== PAUSE TestAccEKSCluster_ComputeConfig_OnUpdate
=== RUN   TestAccEKSCluster_ComputeConfig_ModifyARN
=== PAUSE TestAccEKSCluster_ComputeConfig_ModifyARN
=== RUN   TestAccEKSCluster_ComputeConfig_AddARN
=== PAUSE TestAccEKSCluster_ComputeConfig_AddARN
=== RUN   TestAccEKSCluster_Encryption_create
=== PAUSE TestAccEKSCluster_Encryption_create
=== RUN   TestAccEKSCluster_Encryption_update
=== PAUSE TestAccEKSCluster_Encryption_update
=== RUN   TestAccEKSCluster_Encryption_versionUpdate
=== PAUSE TestAccEKSCluster_Encryption_versionUpdate
=== RUN   TestAccEKSCluster_forceUpdateVersion
=== PAUSE TestAccEKSCluster_forceUpdateVersion
=== RUN   TestAccEKSCluster_version
=== PAUSE TestAccEKSCluster_version
=== RUN   TestAccEKSCluster_logging
=== PAUSE TestAccEKSCluster_logging
=== RUN   TestAccEKSCluster_tags
=== PAUSE TestAccEKSCluster_tags
=== RUN   TestAccEKSCluster_VPC_securityGroupIDs
=== PAUSE TestAccEKSCluster_VPC_securityGroupIDs
=== RUN   TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
=== PAUSE TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
=== RUN   TestAccEKSCluster_VPC_endpointPrivateAccess
=== PAUSE TestAccEKSCluster_VPC_endpointPrivateAccess
=== RUN   TestAccEKSCluster_VPC_endpointPublicAccess
=== PAUSE TestAccEKSCluster_VPC_endpointPublicAccess
=== RUN   TestAccEKSCluster_VPC_publicAccessCIDRs
=== PAUSE TestAccEKSCluster_VPC_publicAccessCIDRs
=== RUN   TestAccEKSCluster_Network_serviceIPv4CIDR
=== PAUSE TestAccEKSCluster_Network_serviceIPv4CIDR
=== RUN   TestAccEKSCluster_Network_ipFamily
=== PAUSE TestAccEKSCluster_Network_ipFamily
=== RUN   TestAccEKSCluster_Outpost_create
=== PAUSE TestAccEKSCluster_Outpost_create
=== RUN   TestAccEKSCluster_Outpost_placement
=== PAUSE TestAccEKSCluster_Outpost_placement
=== RUN   TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== RUN   TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
=== RUN   TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== RUN   TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== PAUSE TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== RUN   TestAccEKSCluster_upgradePolicy
=== PAUSE TestAccEKSCluster_upgradePolicy
=== RUN   TestAccEKSCluster_zonalShiftConfig
=== PAUSE TestAccEKSCluster_zonalShiftConfig
=== RUN   TestAccEKSCluster_deletionProtection
=== PAUSE TestAccEKSCluster_deletionProtection
=== CONT  TestAccEKSCluster_basic
=== CONT  TestAccEKSCluster_VPC_securityGroupIDs
=== CONT  TestAccEKSCluster_ComputeConfig_AddARN
=== CONT  TestAccEKSCluster_RemoteNetwork_Pod_OnCreate
=== CONT  TestAccEKSCluster_Outpost_placement
=== CONT  TestAccEKSCluster_deletionProtection
=== CONT  TestAccEKSCluster_zonalShiftConfig
=== CONT  TestAccEKSCluster_upgradePolicy
=== CONT  TestAccEKSCluster_RemoteNetwork_Node_OnCreate
=== CONT  TestAccEKSCluster_RemoteNetwork_Node_OnUpdate
=== CONT  TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
=== CONT  TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate
=== CONT  TestAccEKSCluster_ComputeConfig_ModifyARN
=== CONT  TestAccEKSCluster_ComputeConfig_OnCreate
=== CONT  TestAccEKSCluster_ComputeConfig_OnUpdate
=== CONT  TestAccEKSCluster_forceUpdateVersion
=== CONT  TestAccEKSCluster_tags
=== CONT  TestAccEKSCluster_version
=== CONT  TestAccEKSCluster_AccessConfig_update
=== CONT  TestAccEKSCluster_logging
=== NAME  TestAccEKSCluster_Outpost_placement
    cluster_test.go:1261: skipping since no Outposts found
--- SKIP: TestAccEKSCluster_Outpost_placement (1.15s)
=== CONT  TestAccEKSCluster_BootstrapSelfManagedAddons_update
--- PASS: TestAccEKSCluster_zonalShiftConfig (493.48s)
=== CONT  TestAccEKSCluster_Encryption_update
--- PASS: TestAccEKSCluster_RemoteNetwork_Node_OnCreate (544.39s)
=== CONT  TestAccEKSCluster_Encryption_versionUpdate
--- PASS: TestAccEKSCluster_RemoteNetwork_Pod_OnCreate (550.72s)
=== CONT  TestAccEKSCluster_AccessConfig_create
--- PASS: TestAccEKSCluster_basic (561.53s)
=== CONT  TestAccEKSCluster_VPC_publicAccessCIDRs
--- PASS: TestAccEKSCluster_tags (563.52s)
=== CONT  TestAccEKSCluster_Outpost_create
    cluster_test.go:1228: skipping since no Outposts found
--- SKIP: TestAccEKSCluster_Outpost_create (0.45s)
=== CONT  TestAccEKSCluster_Network_ipFamily
--- PASS: TestAccEKSCluster_VPC_securityGroupIDs (568.72s)
=== CONT  TestAccEKSCluster_Network_serviceIPv4CIDR
--- PASS: TestAccEKSCluster_upgradePolicy (572.31s)
=== CONT  TestAccEKSCluster_VPC_endpointPrivateAccess
--- PASS: TestAccEKSCluster_BootstrapSelfManagedAddons_migrate (578.80s)
=== CONT  TestAccEKSCluster_VPC_endpointPublicAccess
--- PASS: TestAccEKSCluster_AccessConfig_update (591.68s)
=== CONT  TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
--- PASS: TestAccEKSCluster_deletionProtection (597.48s)
=== CONT  TestAccEKSCluster_disappears
--- PASS: TestAccEKSCluster_logging (760.24s)
=== CONT  TestAccEKSCluster_Encryption_create
--- PASS: TestAccEKSCluster_ComputeConfig_OnUpdate (922.85s)
--- PASS: TestAccEKSCluster_ComputeConfig_AddARN (985.02s)
--- PASS: TestAccEKSCluster_ComputeConfig_OnCreate (1018.58s)
--- PASS: TestAccEKSCluster_BootstrapSelfManagedAddons_update (1060.03s)
--- PASS: TestAccEKSCluster_forceUpdateVersion (1073.44s)
--- PASS: TestAccEKSCluster_version (1082.46s)
--- PASS: TestAccEKSCluster_AccessConfig_create (539.35s)
--- PASS: TestAccEKSCluster_disappears (611.97s)
--- PASS: TestAccEKSCluster_Encryption_create (528.02s)
--- PASS: TestAccEKSCluster_RemoteNetwork_Node_OnUpdate (1415.10s)
--- PASS: TestAccEKSCluster_RemoteNetwork_Pod_OnUpdate (1429.87s)
--- PASS: TestAccEKSCluster_VPC_publicAccessCIDRs (930.55s)
--- PASS: TestAccEKSCluster_Encryption_versionUpdate (1029.97s)
--- PASS: TestAccEKSCluster_Network_ipFamily (1054.75s)
--- PASS: TestAccEKSCluster_Network_serviceIPv4CIDR (1078.94s)
--- PASS: TestAccEKSCluster_ComputeConfig_ModifyARN (1668.22s)
--- PASS: TestAccEKSCluster_VPC_endpointPublicAccess (1096.57s)
--- PASS: TestAccEKSCluster_Encryption_update (1472.01s)
--- PASS: TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update (1445.68s)
--- PASS: TestAccEKSCluster_VPC_endpointPrivateAccess (1763.35s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	2341.106s

Copy link
Copy Markdown
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ewbankkit
Copy link
Copy Markdown
Contributor

@raglin Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit c0326eb into hashicorp:main Aug 25, 2025
39 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions Bot added this to the v6.11.0 milestone Aug 25, 2025
@github-actions github-actions Bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This functionality has been released in v6.11.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link
Copy Markdown
Contributor

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 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. service/eks Issues and PRs that pertain to the eks service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enabling hybrid nodes on EKS existing cluster

6 participants