generated from cloudposse-terraform-components/template
-
-
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
Merged
+170
−158
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - `src/`: Terraform component (`main.tf`, `variables.tf`, `outputs.tf`, `providers.tf`, `versions.tf`, `context.tf`). This is the source of truth. | ||
| - `test/`: Go Terratest suite using Atmos fixtures (`component_test.go`, `fixtures/`, `test_suite.yaml`). Tests deploy/destroy real AWS resources. | ||
| - `README.yaml`: Source for the generated `README.md` (via atmos + terraform-docs). | ||
| - `.github/`: CI/CD, Renovate/Dependabot, labels, and automerge settings. | ||
| - `docs/`: Project docs (if any). Keep lightweight and current. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| - To install atmos read this docs https://github.com/cloudposse/atmos | ||
| - `atmos docs generate readme`: Regenerate `README.md` from `README.yaml` and terraform source. | ||
| - `atmos docs generate readme-simple`: Regenerate `src/README.md` from `README.yaml` and terraform source. | ||
| - `atmos test run`: Run Terratest suite in `test/` (uses Atmos fixtures; creates and destroys AWS resources). | ||
| - Pre-commit locally: `pre-commit install && pre-commit run -a` (runs `terraform_fmt`, `terraform_docs`, `tflint`). | ||
| - TFLint plugin setup: `tflint --init` (uses `.tflint.hcl`). | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Indentation: Terraform 2 spaces; YAML/Markdown 2 spaces. | ||
| - Terraform: prefer lower_snake_case for variables/locals; keep resources/data sources descriptive and aligned with Cloud Posse null-label patterns. | ||
| - Lint/format: `terraform fmt -recursive`, TFLint rules per `.tflint.hcl`. Do not commit formatting or lint violations. | ||
|
|
||
| ## Testing Guidelines | ||
| - Framework: Go Terratest with `github.com/cloudposse/test-helpers` and `atmos` fixtures. | ||
| - Location/naming: put tests in `test/` and name files `*_test.go`. Add scenarios under `test/fixtures/stacks/catalog/usecase/`. | ||
| - Run: `atmos test run`. Ensure AWS credentials are configured; tests may incur AWS costs and will clean up after themselves. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Commits: follow Conventional Commits (e.g., `feat:`, `fix:`, `chore(deps):`, `docs:`). Keep messages concise and scoped. | ||
| - PRs: include a clear description, linked issues, and any behavioral changes. Update `README.yaml` when inputs/outputs change and run `atmos docs generate readme`. | ||
| - CI: ensure pre-commit, TFLint, and tests pass. Avoid unrelated changes in the same PR. | ||
|
|
||
| ## Security & Configuration Tips | ||
| - Never commit secrets. Configure AWS credentials/role assumption externally; the provider setup in `src/providers.tf` supports role assumption via the `iam_roles` module. | ||
| - Global quotas must be applied in `us-east-1`; place in the `gbl` stack and set `region: us-east-1` in `vars`. |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Atmos Configuration — powered by https://atmos.tools | ||
| # | ||
| # This configuration enables centralized, DRY, and consistent project scaffolding using Atmos. | ||
| # | ||
| # Included features: | ||
| # - Organizational custom commands: https://atmos.tools/core-concepts/custom-commands | ||
| # - Automated README generation: https://atmos.tools/cli/commands/docs/generate | ||
| # | ||
| # Import shared configuration used by all modules | ||
| import: | ||
| - https://raw.githubusercontent.com/cloudposse-terraform-components/.github/refs/heads/main/.github/atmos/terraform-component.yaml | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.🏁 Script executed:
Length of output: 2335
Pin imported config to an immutable ref (tag or commit SHA).
File: atmos.yaml (lines 9–11)
📝 Committable suggestion
🤖 Prompt for AI Agents