Skip to content

Conversation

@Benbentwo
Copy link
Contributor

@Benbentwo Benbentwo commented Jun 6, 2025

what

Summary:

  • Bugfix from the Major version v2 initial release with external networking mode supported
  • Cleanup Readme with examples on getting started.

This pull request introduces updates to the documentation and configuration files to reflect changes in the Runs On component, including support for version 2.8.3, improved networking options, and updated parameters for better resource management. Key changes include the addition of new configuration options, updates to URLs and parameters, and enhancements to networking documentation.

Documentation Updates

  • Updated references to defaults.yaml to runs-on/defaults.yaml in README.md and README.yaml to align with the new directory structure. [1] [2]
  • Enhanced networking documentation to include details on using an external VPC and deprecated Transit Gateway configuration. [1] [2]

Configuration Enhancements

  • Updated template_url to point to version 2.8.3 of the CloudFormation template and added a link to the changelog. [1] [2]
  • Revised default parameters, such as reducing AppCPU and AppMemory, changing EmailAddress, and adding new options like EncryptEbs, SSHAllowed, and log retention settings. [1] [2]

Module Updates

  • Changed the source for iam_roles module from a local path to cloudposse/iam-roles/aws version 0.10.0 for consistency and maintainability.

Formatting Improvements

  • Fixed formatting issues in README.md and README.yaml, such as replacing <br/> tags with proper Markdown syntax for better readability.

Summary by CodeRabbit

  • Documentation

    • Updated documentation to clarify and reorganize networking configuration options, including new examples for using existing VPCs and updated default parameter values.
    • Revised references to default configuration paths and template versions.
    • Consolidated and visually de-emphasized deprecated networking instructions.
  • Chores

    • Updated ignored files to exclude .atmos/ directories.
  • Refactor

    • Improved internal configuration logic for handling subnet and security group IDs, with added clarifying comments.
  • Style

    • Applied minor formatting improvements in documentation for clarity.
  • Bug Fixes

    • Removed validation checks requiring VPC and subnet IDs when using external networking, allowing more flexible configuration.

Updated readme to better explain the getting started process.
@coderabbitai
Copy link

coderabbitai bot commented Jun 6, 2025

Walkthrough

This update revises documentation and configuration for networking in the RunsOn component. It changes default parameter values, updates CloudFormation and Terraform module references, reorganizes and clarifies networking configuration examples, removes certain variable validations, and adds .atmos/ to .gitignore. No changes to exported code entities were made.

Changes

File(s) Change Summary
.gitignore Added .atmos/ to ignored paths.
README.md, README.yaml, src/README.md Updated documentation: new default paths, parameter values, CloudFormation template version, and networking examples. Deprecated and reorganized some sections.
src/main.tf Adjusted subnet and security group ID logic, reordered conditions, switched to direct variable for VPC ID, and added clarifying comments.
src/variables.tf Removed validation blocks requiring vpc_id and subnet_ids for external networking.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docs
    participant Terraform
    participant AWS

    User->>Docs: Reads updated networking configuration examples
    User->>Terraform: Applies configuration with new parameters and networking logic
    Terraform->>AWS: Provisions resources using provided or default VPC, subnet, and security group IDs
    AWS-->>Terraform: Returns resource outputs
    Terraform-->>User: Outputs resource details
Loading

Possibly related PRs

  • feat: support network_stack parameter #19: Introduced the networking_stack parameter and foundational logic for embedded vs external networking, which this PR builds upon by updating documentation, defaults, and validations.

Poem

In the garden of code where the networks run free,
We pruned the docs and changed defaults with glee.
No more strict checks for IDs to be found,
Just clearer examples and logic abound.
With .atmos/ ignored, our repo stays neat—
This update’s a carrot-flavored treat! 🥕


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mergify mergify bot requested review from a team June 6, 2025 22:53
@mergify mergify bot added triage Needs triage needs-test Needs testing labels Jun 6, 2025
Copy link

@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: 0

🧹 Nitpick comments (3)
src/main.tf (2)

4-10: Ensure conditional parameter mapping only for external networking.

The external_security_group_id map currently only checks var.security_group_id != null without verifying var.networking_stack == "external". Consider tightening it to:

external_security_group_id = var.security_group_id != null && var.networking_stack == "external" ? { "ExternalVpcSecurityGroupId" = var.security_group_id } : {}

to avoid passing this parameter in embedded mode.


73-75: Fix typo in comment.

The phrase “batties included optional feature” appears to be a typo. Consider updating to “batteries-included optional feature” for clarity.

README.yaml (1)

69-69: Remove trailing whitespace.

The template_url line has trailing spaces at the end. Removing them will prevent YAML lint errors.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 69-69: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6a6d2f and 4136ead.

📒 Files selected for processing (6)
  • .gitignore (1 hunks)
  • README.md (6 hunks)
  • README.yaml (4 hunks)
  • src/README.md (4 hunks)
  • src/main.tf (2 hunks)
  • src/variables.tf (0 hunks)
💤 Files with no reviewable changes (1)
  • src/variables.tf
🧰 Additional context used
🧠 Learnings (1)
src/main.tf (1)
Learnt from: dudymas
PR: cloudposse-terraform-components/aws-runs-on#19
File: src/main.tf:82-92
Timestamp: 2025-05-27T16:32:35.338Z
Learning: In the aws-runs-on Terraform component, the CloudFormation stack receives either an external security group ID (via ExternalVpcSecurityGroupId parameter) or a newly created security group ID and outputs the security group ID it's using via RunsOnSecurityGroupId. This means local.security_group_id from the CloudFormation output is the correct unified reference for security group rules in all deployment modes (embedded/external networking), eliminating the need for complex conditional logic in Terraform locals.
🪛 YAMLlint (1.37.1)
README.yaml

[error] 69-69: trailing spaces

(trailing-spaces)


[error] 148-148: trailing spaces

(trailing-spaces)

🪛 LanguageTool
README.md

[uncategorized] ~323-~323: A period might be missing here.
Context: ...s_list_of_maps. Not added to tagsorid`.
This is for some rare cases wher...

(AI_EN_LECTOR_MISSING_PUNCTUATION_PERIOD)


[uncategorized] ~324-~324: A comma might be missing here.
Context: ...(e.g. workers or cluster) to add to id,
in the order they appear in the ...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[grammar] ~329-~329: Did you mean “too false to”?
Context: ..."> enabled | Set to false to prevent the module from creating any re...

(TOO_ADJECTIVE_TO)


[grammar] ~331-~331: The verb ‘keep’ seems to be in the wrong form here.
Context: ... for unlimited length.
Set to null for keep the existing setting, which defaults to...

(FOR_VB)


[typographical] ~336-~336: Consider adding a comma after ‘Usually’ for more clarity.
Context: ... name | ID element. Usually the component or solution name, e.g. 'a...

(RB_LY_COMMA)


[uncategorized] ~336-~336: Possible missing preposition found.
Context: ...ID element not also included as a tag.
The "name" tag is set to the full id s...

(AI_EN_LECTOR_MISSING_PREPOSITION)


[typographical] ~337-~337: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...space](#input_namespace) | ID element. Usually an abbreviation of your organization na...

(RB_LY_COMMA)


[typographical] ~339-~339: Do not use a colon (:) before a series that is introduced by a preposition (‘of’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ... stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE |...

(RP_COLON)

🪛 markdownlint-cli2 (0.17.2)
README.md

338-338: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary
🔇 Additional comments (16)
.gitignore (1)

10-10: Ignore Atmos state directory.

Adding .atmos/ ensures Atmos KV store outputs are not accidentally committed to Git.

src/main.tf (2)

6-6: Verify comma-separated subnet IDs match CloudFormation expectations.

Using join(",", var.subnet_ids) produces a string of comma-delimited subnet IDs. Confirm the CloudFormation template’s ExternalVpcSubnetIds parameter expects a comma-separated string rather than a list.


80-86: Align SG creation logic with parameter mapping.

The enabled condition in the security_group module matches the created_security_group_id logic, and using var.vpc_id here avoids dependency cycles. This change correctly reflects the removal of strict validation on vpc_id in variables.tf.

src/README.md (4)

27-32: Update default path reference.

Switching the defaults snippet to reference runs-on/defaults.yaml accurately reflects the reorganized directory structure.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

30-30: Bare URL used
null

(MD034, no-bare-urls)


42-45: Versioned CloudFormation template URL.

The new version-specific URL (template-v2.8.3.yaml) paired with a commented generic URL and changelog link provides clear upgrade guidance.


52-62: Review new parameter defaults.

The added parameters (EncryptEbs, SSHAllowed, RunnerLargeDiskSize, Ec2LogRetentionInDays, VpcFlowLogRetentionInDays) and adjusted CPU/memory values align with the PR objectives. Please verify these defaults meet operational and security requirements.


92-100: External networking section clarity.

The new “External networking (Use existing VPC)” section provides clear YAML examples, including Atmos KV usage. The import paths and variable names are consistent with Terraform changes.

README.md (5)

47-50: Correct defaults file path.

Referencing runs-on/defaults.yaml in the defaults example now matches the actual file location.


62-65: CloudFormation template URL updated.

Embedding the version-specific template URL with a link to the changelog is a helpful enhancement.


66-74: New default parameters added.

The introduction of EncryptEbs, SSHAllowed, and updated resource allocations reflects the component’s v2.8.3 capabilities. Ensure these values align with production expectations.


112-120: External networking example improved.

The updated example for using an existing VPC (with vpc_id, subnet_ids, security_group_id) is clear and consistent with Terraform.


303-307: Update iam_roles module source and version.

Switching from a local path to the official cloudposse/iam-roles/aws v0.10.0 module improves upstream consistency and maintainability.

README.yaml (4)

52-56: Update defaults path reference.

Changing the snippet to runs-on/defaults.yaml aligns with the directory restructure and matches the markdown README.


67-70: Versioned CloudFormation template URL.

The switch to template-v2.8.3.yaml alongside the commented generic URL and changelog link is well-documented.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 69-69: trailing spaces

(trailing-spaces)


71-78: Validate new default parameters.

The defaults for EncryptEbs, SSHAllowed, and retention settings are correctly defined. Confirm these match the team’s security and operational policies.


117-124: External networking YAML example.

The new example using Atmos KV store (!store auto/ssm) is clear and aligns with Terraform changes.

@mergify mergify bot removed the triage Needs triage label Jun 9, 2025
@Benbentwo Benbentwo added this pull request to the merge queue Jun 9, 2025
Merged via the queue into main with commit c3bca7c Jun 9, 2025
14 checks passed
@Benbentwo Benbentwo deleted the bugfix/v2-release branch June 9, 2025 18:07
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

These changes were released in v2.0.1.

@coderabbitai coderabbitai bot mentioned this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-test Needs testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants