-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update documentation to include nested stacks recommended tree layout #5125
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
base: main
Are you sure you want to change the base?
Update documentation to include nested stacks recommended tree layout #5125
Conversation
|
Someone is attempting to deploy a commit to the Gruntwork Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThis PR adds a comprehensive documentation section to the stacks guide covering a recommended catalog/main stack pattern, including detailed file structures, HCL examples for environment stacks, patterns for explicit stacks, dependency wiring guidelines, and common deployment workflows for multi-level configurations. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~8 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
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: 0
🧹 Nitpick comments (2)
docs-starlight/src/content/docs/03-features/02-stacks.mdx (2)
281-281: Consider strengthening the adjective at line 281.The phrase "is very small" uses a weak intensifier. Consider alternatives like "is minimal," "is concise," or simply "contains just" to make the description more direct.
468-474: Reduce repetitive sentence structure in the bulleted list.Five consecutive bullet points begin with "It," which creates monotonous pacing. Consider varying the sentence structure—for example:
-* It keeps catalog stacks declarative, focusing on *structure*. -* It ensures unit files remain the only place where runtime dependencies are evaluated. -* It avoids the "unsupported block `dependency` in stack" errors. -* It enables nested stacks to pass dependency paths cleanly through recursive `values`. -* It keeps the stack generate mechanism stable even in large multi–environment catalogs. +* Catalog stacks remain declarative, focusing on *structure*. +* Unit files become the only place where runtime dependencies are evaluated. +* This pattern avoids the "unsupported block `dependency` in stack" errors. +* Nested stacks can pass dependency paths cleanly through recursive `values`. +* The stack generate mechanism stays stable even in large multi–environment catalogs.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
-
docs-starlight/src/content/docs/03-features/02-stacks.mdx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs-starlight/**/*.md*
⚙️ CodeRabbit configuration file
docs-starlight/**/*.md*: Review the documentation for clarity, grammar, and spelling. Make sure that the documentation is easy to understand and follow. There is currently a migration underway from the Jekyll based documentation indocsto the Starlight + Astro based documentation indocs-starlight. Make sure that thedocs-starlightdocumentation is accurate and up-to-date with thedocsdocumentation, and that any difference between them results in an improvement in thedocs-starlightdocumentation.Referenced Documentation Contents
docs-starlight/src/content/docs/03-features/02-stacks.mdx:
Actionable guidelines from the Stacks docs relevant to nested/exlicit stacks:
- Promote a reusable catalog main stack pattern and per-environment live stacks; catalog/main wires sub-stacks (environment, compute, storage) while live environments instantiate the catalog main stack.
- Use get_repo_root() to construct stable, environment-agnostic paths for both catalog stacks and nested stacks; prefer paths like ${get_repo_root()}/catalog/units/... and ${get_repo_root()}/catalog/stacks/...
- Pass dependency/config_path information through values in catalog stacks (e.g., vpc_config_path) instead of declaring dependency blocks inside stack blueprints; declare actual dependency blocks only in generated unit terragrunt.hcl files.
- Do not place dependency blocks inside terragrunt.stack.hcl; keep stack blueprints declarative and focused on structure.
- Inside units, declare dependency blocks using paths provided via values (config_path), and read outputs from dependency.outputs for inputs.
- Use the catalog main stack to compose environment, compute, and storage patterns; live stacks merely provide environment-specific values (environment, cidr, tags, region, etc.).
- Leverage stack generate/run commands to automate creation and deployment of generated units; understand the recommended workflow: generate from stack.hcl, then run apply, or combine as stack run apply.
...
Files:
docs-starlight/src/content/docs/03-features/02-stacks.mdx
🪛 LanguageTool
docs-starlight/src/content/docs/03-features/02-stacks.mdx
[style] ~281-~281: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...*live/<env>/terragrunt.stack.hcl** is very small: it just calls the catalog main stack o...
(EN_WEAK_ADJECTIVE)
[style] ~472-~472: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e runtime dependencies are evaluated. * It avoids the “unsupported block `dependen...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~473-~473: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... block dependency in stack” errors. * It enables nested stacks to pass dependenc...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~474-~474: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s cleanly through recursive values. * It keeps the stack generate mechanism stab...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (1)
docs-starlight/src/content/docs/03-features/02-stacks.mdx (1)
237-484: Comprehensive addition that aligns well with recommended patterns and guidelines.This new section effectively introduces the reusable catalog main stack pattern and provides clear guidance on best practices for explicit stacks. The content is well-organized, progresses logically, and includes multiple practical examples that demonstrate the recommended patterns. Particularly strong are the sections on:
- The three-tier stack architecture (catalog main → environment/compute/storage → units)
- Use of
get_repo_root()for predictable paths- Passing
config_paththrough values instead of embedding dependency blocks in stack blueprintsThe examples are concrete, would work as written, and effectively illustrate each concept.
Description
This PR improves the Stacks documentation by clarifying best practices for structuring explicit Terragrunt stacks, especially in reusable catalog setups. It adds guidance on:
These changes aim to reduce confusion around nested explicit stacks, improve reproducibility, and prevent common pitfalls encountered by users implementing multi-environment catalogs.
TODOs
Read the Gruntwork contribution guidelines.
Summary by CodeRabbit