-
-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate README generation to atmos #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds 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
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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
✨ Finishing touches🧪 Generate unit tests
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. Comment |
|
Important Cloud Posse Engineering Team Review RequiredThis 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 |
There was a problem hiding this 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-handlerREADME.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-ignoremarkers 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
📒 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
.cacheand.atmosaligns 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 Terraformhelm_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 addingreferences: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.
| # Import shared configuration used by all modules | ||
| import: | ||
| - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml |
There was a problem hiding this comment.
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.
| # 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.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
what
why
Summary by CodeRabbit
Documentation
Chores