Skip to content

Conversation

@goruha
Copy link
Contributor

@goruha goruha commented Sep 12, 2025

what

  • Update README.yaml

why

  • Use atmos to generate readme

Summary by CodeRabbit

  • Documentation

    • Expanded README with Atmos/Terraform guidance, testing instructions, and clarified provider/module version ranges; improved formatting and references.
    • Added AGENTS.md with repository guidelines and workflows.
    • Updated src documentation and references.
    • Restructured README.yaml with metadata (tags, categories, license, badges), externalized references, and clearer usage section.
  • Chores

    • Added .cache and .atmos to .gitignore.
    • Introduced Atmos configuration for centralized project settings.
    • Simplified Makefile by removing build/test harness targets.

@goruha goruha requested a review from a team as a code owner September 12, 2025 10:41
@goruha goruha added auto-update This PR was automatically generated no-release Do not create a new release (wait for additional code changes) migration This PR involves a migration labels Sep 12, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 12, 2025

Walkthrough

Adds Atmos tooling and configuration, restructures README.yaml metadata, updates README docs, introduces AGENTS.md guidelines, adjusts src README lint markers, simplifies Makefile by removing build-harness and test targets, and updates .gitignore to ignore .cache and .atmos. Adds atmos.yaml importing shared Terraform component config.

Changes

Cohort / File(s) Summary
Git ignore updates
./.gitignore
Added ignore patterns: .cache, .atmos.
Build system cleanup
./Makefile
Removed build-harness include, all target, and test target with its script invocation.
New contributor guidelines
./AGENTS.md
Added project structure, commands (atmos, tests, pre-commit, TFLint), coding/testing conventions, and security guidance.
README docs updates
./README.md, ./src/README.md
Expanded Atmos usage/testing sections; tightened provider/module versions in tables; adjusted formatting and references; replaced pre-commit doc hooks with markdownlint wrappers in src/README.md.
README metadata restructure
./README.yaml
Reorganized to structured metadata (tags, categories, license, badges), top-level references array, adjusted usage block; removed embedded docs hook sections.
Atmos configuration addition
./atmos.yaml
New Atmos config importing shared Terraform component settings from a remote URL.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant A as Atmos CLI
    participant RC as Remote Atmos Config
    participant TD as terraform-docs
    participant Repo as Repo (README.md)

    Dev->>A: atmos docs generate readme / readme-simple
    A->>RC: Import shared config
    RC-->>A: Config loaded
    A->>TD: Invoke terraform-docs with component metadata
    TD-->>A: Rendered README content
    A->>Repo: Update README.md
    note over A,Repo: New/updated README generated via Atmos + terraform-docs
Loading
sequenceDiagram
    autonumber
    actor Dev as Developer
    participant A as Atmos CLI
    participant TR as Terratest Runner
    participant FX as Test Fixtures (stacks)
    participant AWS as AWS

    Dev->>A: atmos test run
    A->>TR: Execute Go tests
    TR->>FX: Load Atmos fixtures/stacks
    TR->>AWS: Provision/use real resources (assumed roles)
    AWS-->>TR: Responses/events
    TR-->>A: Test results
    A-->>Dev: Summary and logs
    note over TR,A: Tests use github.com/cloudposse/test-helpers
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Migrate README generation to atmos" is concise and accurately reflects the primary change in the PR—moving README generation to Atmos (e.g., adding atmos.yaml and updating README.yaml/README.md and related docs). It clearly communicates the main intent and is relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I thump my paw—new paths appear,
Atmos whispers, “Docs are here!”
Makefile slim, the clutter gone,
Readmes bloom at rabbit dawn.
YAML gardens, tags in rows—
I nibble metadata as it grows.
Hop, test, ship—onward it goes! 🐇✨

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migration/20251908

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 requested review from a team September 12, 2025 10:41
@mergify
Copy link

mergify bot commented Sep 12, 2025

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify bot added the needs-cloudposse Needs Cloud Posse assistance label Sep 12, 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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

17-23: Update generation header to Atmos.

Header still references build‑harness. Replace with Atmos instructions to avoid confusion.

-  ** This file was automatically generated by the `cloudposse/build-harness`.
-  ** 1) Make all changes to `README.yaml`
-  ** 2) Run `make init` (you only need to do this once)
-  ** 3) Run`make readme` to rebuild this file.
+  ** This file is generated by Atmos.
+  ** 1) Make all changes to `README.yaml`
+  ** 2) Run `atmos docs generate readme` to rebuild this file.
🧹 Nitpick comments (7)
.gitignore (1)

26-26: Reconsider ignoring .terraform.lock.hcl.

Many teams commit the provider lock file for reproducibility. If ignoring is intentional for this repo, ignore this; otherwise consider committing it.

src/README.md (1)

158-159: Add alt text to image (MD045).

Improve accessibility and satisfy markdownlint.

-[<img src="https://cloudposse.com/logo-300x69.svg" height="32" align="right"/>](https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse-terraform-components/aws-eks-node-termination-handler&utm_content=)
+[<img alt="Cloud Posse" src="https://cloudposse.com/logo-300x69.svg" height="32" align="right"/>](https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse-terraform-components/aws-eks-node-termination-handler&utm_content=)
README.yaml (1)

48-54: Disambiguate reference names.

Both references have the same name. Use distinct names to make generated sections clearer.

-  - name: aws-node-termination-handler
-    description: Helm Chart
+  - name: aws-node-termination-handler Helm Chart
     url: https://artifacthub.io/packages/helm/aws/aws-node-termination-handler
-  - name: aws-node-termination-handler
-    description: AWS Node Termination Handler
+  - name: AWS Node Termination Handler (GitHub)
     url: https://github.com/aws/aws-node-termination-handler
README.md (2)

48-50: Add alt text to demo GIF (MD045).

-<img src="https://github.com/cloudposse/atmos/blob/main/docs/demo.gif?raw=true"/><br/>
+<img alt="Atmos demo" src="https://github.com/cloudposse/atmos/blob/main/docs/demo.gif?raw=true"/><br/>

91-93: Remove no-op prettier-ignore block.

Empty prettier-ignore markers have no effect; delete or wrap the intended generated section.

AGENTS.md (2)

11-11: Replace bare URL with markdown link (MD034).

-- To install atmos read this docs https://github.com/cloudposse/atmos
+- To install Atmos, see the [installation docs](https://github.com/cloudposse/atmos).

11-11: Tighten grammar.

“read this docs” → “see the installation docs”, and capitalize Atmos consistently (as in the diff above).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e1d82b and 6416c2a.

📒 Files selected for processing (7)
  • .gitignore (1 hunks)
  • AGENTS.md (1 hunks)
  • Makefile (0 hunks)
  • README.md (6 hunks)
  • README.yaml (2 hunks)
  • atmos.yaml (1 hunks)
  • src/README.md (2 hunks)
💤 Files with no reviewable changes (1)
  • Makefile
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
AGENTS.md

11-11: Bare URL used

(MD034, no-bare-urls)

src/README.md

158-158: Images should have alternate text (alt text)

(MD045, no-alt-text)

README.md

48-48: Images should have alternate text (alt text)

(MD045, no-alt-text)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (5)
.gitignore (1)

10-11: Good add: ignore Atmos artifacts.

Adding .cache and .atmos aligns with the new Atmos workflow and avoids polluting commits.

src/README.md (1)

70-81: Confirm chart version consistency.

chart_version: 0.15.3 — ensure this matches the version used in the Terraform helm_release (if pinned) to prevent drift between docs and code.

README.yaml (1)

12-47: Nice restructure to Atmos-friendly schema.

Moving usage into usage: and adding references: makes docs generation deterministic.

README.md (1)

294-296: Verify minimum Go version.

Docs say “Go 1.24+”. Confirm this is the actual minimum required by tests/linters; otherwise lower to the earliest supported release.

AGENTS.md (1)

14-15: Caution about costs already noted—nice.

Good callout that tests create/destroy AWS resources.

Comment on lines +9 to +11
# Import shared configuration used by all modules
import:
- https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Pin imported config to an immutable ref.

The URL tracks refs/heads/main, which is mutable. Pin to a tag or commit SHA to avoid supply‑chain drift.

-import:
-  - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml
+import:
+  # Pinned to a specific commit for reproducibility (update via Renovate/Dependabot)
+  - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/<commit-sha>/.github/atmos/terraform-component.yaml

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Working directory: $(pwd)"
echo "---- Listing top-level files ----"
ls -la | sed -n '1,200p'

echo "---- Finding atmos.yaml files ----"
rg -n --hidden --no-ignore -S --glob '!**/node_modules/**' '(^|\s)atmos\.yaml($|\s)' || true
find . -type f -name "atmos.yaml" -print -exec sed -n '1,200p' {} \; || true

echo "---- Searching for the specific remote import URL ----"
rg -n --hidden --no-ignore -S --glob '!**/node_modules/**' 'raw\.githubusercontent\.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component\.yaml' || true

echo "---- Searching for cloudposse-terraform-components references ----"
rg -n --hidden --no-ignore -S --glob '!**/node_modules/**' 'cloudposse-terraform-components' || true

echo "Done."

Length of output: 2335


Pin imported config to an immutable ref (tag or commit SHA).

File: atmos.yaml (lines 9–11)

-import:
-  - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml
+import:
+  # Pinned to a specific commit for reproducibility (update via Renovate/Dependabot)
+  - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/<commit-sha>/.github/atmos/terraform-component.yaml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Import shared configuration used by all modules
import:
- https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml
# Import shared configuration used by all modules
import:
# Pinned to a specific commit for reproducibility (update via Renovate/Dependabot)
- https://raw.githubusercontent.com/cloudposse-terraform-components/.github/<commit-sha>/.github/atmos/terraform-component.yaml
🤖 Prompt for AI Agents
In atmos.yaml around lines 9–11, the imported config references a mutable branch
(refs/heads/main); update the import URL to point to an immutable ref by
replacing "refs/heads/main" with either a specific tag ref (e.g.
refs/tags/<TAG>) or a commit SHA (the raw URL containing the commit hash).
Ensure the chosen tag or SHA corresponds to the intended release/commit, update
the URL accordingly, run a quick plan/apply to verify the import loads, and
commit the change.

Comment on lines +311 to +313
The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file.

Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix link to imported Atmos config.

The link points to cloudposse/.github and terraform-module.yaml, but this repo imports cloudposse-terraform-components/.github and terraform-component.yaml. Update to match.

-The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file.
+The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml) file.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file.
Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos.
The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml) file.
Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos.
🤖 Prompt for AI Agents
In README.md around lines 311 to 313, the external link points to
cloudposse/.github/terraform-module.yaml but this repo imports the config from
cloudposse-terraform-components/.github and the file is
terraform-component.yaml; update the URL to reference the
cloudposse-terraform-components repository and the terraform-component.yaml file
(preserving the raw GitHub path/branch format) so the link points to the correct
imported Atmos config.

@goruha goruha merged commit d4ea9ce into main Sep 12, 2025
14 checks passed
@goruha goruha deleted the migration/20251908 branch September 12, 2025 16:54
@mergify mergify bot removed the needs-cloudposse Needs Cloud Posse assistance label Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-update This PR was automatically generated migration This PR involves a migration no-release Do not create a new release (wait for additional code changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants