Skip to content

Feat: Add remote_network_config configuration#258

Merged
RoseSecurity merged 2 commits intocloudposse:mainfrom
mszczepanczyk-soprasteria:main
Oct 1, 2025
Merged

Feat: Add remote_network_config configuration#258
RoseSecurity merged 2 commits intocloudposse:mainfrom
mszczepanczyk-soprasteria:main

Conversation

@mszczepanczyk-soprasteria
Copy link
Contributor

what

  • Add configuration for remote node and pod networks

why

  • Support for hybrid nodes
  • We use it in combination with Cilium in overlay mode so that the cluster correctly recognizes IPs in cilium pod CIDR as pods

references

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

Adds a new remote_network_config input and wiring across variables and examples, and implements corresponding dynamic configuration in the aws_eks_cluster resource to pass remote node and pod CIDR lists when provided.

Changes

Cohort / File(s) Change Summary
Root variable and resource updates
variables.tf, main.tf
Adds variable remote_network_config (object with required remote_node_networks_cidrs and optional remote_pod_networks_cidrs); updates aws_eks_cluster.default with a remote_network_config dynamic block that conditionally renders remote_node_networks and remote_pod_networks CIDR lists.
Example module wiring
examples/complete/main.tf
Passes remote_network_config = local.remote_network_config to the eks_cluster module.
Example variables and fixtures
examples/complete/variables.tf, examples/complete/fixtures.us-east-2.tfvars
Defines example variable remote_network_config with same schema; adds example tfvars values for remote_node_networks_cidrs and remote_pod_networks_cidrs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Feat: Add remote_network_config configuration” succinctly and accurately conveys the primary change of the pull request—adding the remote_network_config input—without extraneous detail or noise, making it clear and specific for reviewers scanning the history.
Description Check ✅ Passed The description directly relates to the changes by outlining what is being added (remote node and pod network configuration) and why (support for hybrid nodes and Cilium overlay mode), and it references relevant documentation, so it clearly describes the modifications without being off-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mergify mergify bot added the triage Needs triage label Oct 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ca360c6 and c23aad4.

⛔ Files ignored due to path filters (1)
  • README.md is excluded by !README.md
📒 Files selected for processing (5)
  • examples/complete/fixtures.us-east-2.tfvars (1 hunks)
  • examples/complete/main.tf (1 hunks)
  • examples/complete/variables.tf (1 hunks)
  • main.tf (1 hunks)
  • variables.tf (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
examples/complete/*.tf

⚙️ CodeRabbit configuration file

This is framework for testing and standards are very relaxed, plus certain things need to be certain ways for testing. Exclude from review unless you find misspelling or similar error in comments or serious errors in code.

Files:

  • examples/complete/main.tf
  • examples/complete/variables.tf
🔇 Additional comments (4)
variables.tf (1)

385-392: LGTM! Variable definition is well-structured.

The variable correctly models the remote network configuration with required node CIDRs and optional pod CIDRs, aligning with the PR objective to support hybrid nodes and Cilium overlay mode.

examples/complete/fixtures.us-east-2.tfvars (1)

64-67: LGTM! Test fixture values are appropriate.

The CIDR blocks provided are valid private IP ranges suitable for testing the remote network configuration feature.

examples/complete/variables.tf (1)

145-152: LGTM! Variable definition correctly mirrors root module.

The variable definition in the example matches the root module's variable structure, allowing proper pass-through of the remote network configuration.

main.tf (1)

113-133: Verify AWS Terraform remote_network_config dynamic block usage.

  • Confirm that remote_node_networks and remote_pod_networks support exactly one block each (not multiple) and that wrapping the CIDR list in another list (for_each = […]) is required.
  • Confirm that the cidrs argument accepts a list of CIDR strings rather than individual values.

Correct remote_network_config var reference

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@RoseSecurity
Copy link

/terratest

Copy link

@RoseSecurity RoseSecurity left a comment

Choose a reason for hiding this comment

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

This is an awesome addition. Thanks for the contribution

@RoseSecurity RoseSecurity merged commit 775ec28 into cloudposse:main Oct 1, 2025
16 checks passed
@mergify mergify bot removed the triage Needs triage label Oct 1, 2025
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

These changes were released in v4.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants