Skip to content

Update QuickStart documentation with an additional example to control the output directory #4299

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
merged 5 commits into from
May 20, 2025

Conversation

james03160927
Copy link
Contributor

@james03160927 james03160927 commented May 19, 2025

Description

Fixes #4296.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

Summary by CodeRabbit

  • Documentation
    • Expanded the quick start guide with detailed explanations of the .terragrunt-cache directory, Terragrunt caching behavior, and strategies for controlling output file locations.
    • Added new example configurations and a README to illustrate managing file outputs using the get_terragrunt_dir() function.
  • Chores
    • Updated example directories with .gitignore files to exclude cache and generated files.

Copy link

vercel bot commented May 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:12pm

Copy link
Contributor

coderabbitai bot commented May 19, 2025

📝 Walkthrough

Walkthrough

This change updates the documentation and adds new example files to clarify Terragrunt’s .terragrunt-cache behavior, how file outputs are managed, and how to control output locations using the get_terragrunt_dir() function. The update includes new configuration and example files to demonstrate correct usage, and expands the Quick Start guide accordingly.

Changes

File(s) Change Summary
docs/_docs/01_getting-started/01-quick-start.md
docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx
Expanded documentation to explain the .terragrunt-cache directory, its purpose, and how to control file output locations using get_terragrunt_dir() and an output_dir variable. Added example code and explanations for new users.
test/fixtures/docs/01-quick-start/step-05.1/.gitignore Added .gitignore to ignore .terragrunt-cache and hi.txt in the example directory.
test/fixtures/docs/01-quick-start/step-05.1/README.md Added README describing how the example controls output file locations with get_terragrunt_dir().
test/fixtures/docs/01-quick-start/step-05.1/bar/terragrunt.hcl
test/fixtures/docs/01-quick-start/step-05.1/foo/terragrunt.hcl
Added new Terragrunt configuration files for bar and foo that set output_dir using get_terragrunt_dir() and specify different content.
test/fixtures/docs/01-quick-start/step-05.1/shared/main.tf Added new Terraform module that takes content and output_dir variables and writes hi.txt to the specified directory.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Terragrunt
    participant Terraform Module (shared)
    participant File System

    User->>Terragrunt: Run terragrunt apply in foo or bar
    Terragrunt->>Terraform Module (shared): Passes content and output_dir (using get_terragrunt_dir())
    Terraform Module (shared)->>File System: Creates hi.txt in output_dir (foo/bar directory)
    Terragrunt->>User: Operation complete, hi.txt created in correct location
Loading

Assessment against linked issues

Objective Addressed Explanation
Clarify .terragrunt-cache behavior and file output location in Quick Start docs (#4296)
Update example to use get_terragrunt_dir() and output_dir variable for correct file placement (#4296)
Add example configuration and documentation to illustrate correct usage for new users (#4296)
Add .gitignore to ignore .terragrunt-cache and output files in example directories (#4296)

Suggested reviewers

  • levkohimins
  • denis256

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


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

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.

Copy link
Contributor

@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 (7)
test/fixtures/docs/01-quick-start/step-05.1/shared/main.tf (2)

1-2: Specify variable types and descriptions.
To improve clarity and enable built-in validation, explicitly declare each variable’s type (e.g., type = string) and consider adding a brief description block.


5-6: Use joinpath() for cross-platform paths.
Rather than string interpolation, leverage Terraform’s joinpath() function to handle OS-specific separators. For example:

- filename = "${var.output_dir}/hi.txt"
+ filename = joinpath(var.output_dir, "hi.txt")
test/fixtures/docs/01-quick-start/step-05.1/README.md (2)

1-1: Add a top-level heading.
To satisfy Markdown best practices (MD041) and improve readability, prepend an H1 heading. For example:

# Controlling Output File Locations
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

1-1: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)


3-3: Remove trailing spaces and ensure single newline.
Delete the extra space at the end of this line and add exactly one newline at EOF to comply with MD009 and MD047.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


3-3: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/_docs/01_getting-started/01-quick-start.md (3)

309-315: Surround the first bullet list with blank lines
Markdown lint (MD032) requires blank lines before and after lists. Add a blank line between the colon on line 309 and the first list item, and ensure there’s a blank line after the last list item on line 313.

Proposed diff:

 When Terragrunt runs these commands, it creates a `.terragrunt-cache` directory in each unit's directory. This cache directory serves as Terragrunt's scratch directory where it:
-
-  - Downloads your remote OpenTofu/Terraform configurations
+  
+  - Downloads your remote OpenTofu/Terraform configurations
   - Runs your OpenTofu/Terraform commands
   - Stores downloaded modules and providers
   - Stores generated files (in this case, the `hi.txt` file will be created under `.terragrunt-cache/[HASH]/[HASH]/hi.txt` rather than directly in the `foo` or `bar` directories)
-  
+
 With this configuration, the `hi.txt` files will be created directly in the `foo` and `bar` directories instead of the `.terragrunt-cache` directory. This is a common pattern when you want to generate files in specific locations relative to your Terragrunt configuration.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

310-310: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🪛 GitHub Check: Run Lint

[failure] 310-310: Lists should be surrounded by blank lines
docs/_docs/01_getting-started/01-quick-start.md:310 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Downloads your remote OpenTo..."] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md

🪛 GitHub Actions: Markdown Lint

[error] 310-310: markdownlint MD032: Lists should be surrounded by blank lines.


317-321: Surround the second bullet list with blank lines
Similarly, insert a blank line before the list at line 318 and after the last item at line 320 to satisfy MD032.

Proposed diff:

 Inside the cache directory, Terragrunt automatically converts your `terragrunt.hcl` configuration into standard OpenTofu/Terraform configuration files:
-
-  - Generates `main.tf` with your module source and provider configurations
+  
+  - Generates `main.tf` with your module source and provider configurations
   - Creates `terraform.tfvars` or `terraform.tfvars.json` with your input variables
   - Sets up any additional files like `outputs.tf` and `variables.tf` based on your Terragrunt configuration
-  
+
 The `.terragrunt-cache` directory is typically added to `.gitignore` files, similar to the `.terraform` directory that OpenTofu generates. You can safely delete this folder at any time, and Terragrunt will recreate it as necessary.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

318-318: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🪛 GitHub Check: Run Lint

[failure] 318-318: Lists should be surrounded by blank lines
docs/_docs/01_getting-started/01-quick-start.md:318 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Generates main.tf with you..."] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md


324-325: Remove extra blank lines
There are two consecutive blank lines at line 324, which violates MD012. Reduce to a single blank line.

Proposed diff:

-  

-
 If you want to control where the files are created, you can modify the module to accept an output directory parameter. For example, you can update the `shared/main.tf` file to:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

324-324: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

🪛 GitHub Check: Run Lint

[failure] 324-324: Multiple consecutive blank lines
docs/_docs/01_getting-started/01-quick-start.md:324 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c343f07 and 2ce3039.

📒 Files selected for processing (6)
  • docs/_docs/01_getting-started/01-quick-start.md (1 hunks)
  • test/fixtures/docs/01-quick-start/step-05.1/.gitignore (1 hunks)
  • test/fixtures/docs/01-quick-start/step-05.1/README.md (1 hunks)
  • test/fixtures/docs/01-quick-start/step-05.1/bar/terragrunt.hcl (1 hunks)
  • test/fixtures/docs/01-quick-start/step-05.1/foo/terragrunt.hcl (1 hunks)
  • test/fixtures/docs/01-quick-start/step-05.1/shared/main.tf (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.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 under...

docs/**/*.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 in docs to the Starlight + Astro based documentation in docs-starlight. Whenever changes are made to the docs directory, ensure that an equivalent change is made in the docs-starlight directory to keep the docs-starlight documentation accurate.

  • docs/_docs/01_getting-started/01-quick-start.md
🪛 markdownlint-cli2 (0.17.2)
test/fixtures/docs/01-quick-start/step-05.1/README.md

1-1: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)


3-3: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


3-3: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/_docs/01_getting-started/01-quick-start.md

310-310: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


318-318: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


324-324: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

🪛 GitHub Check: Run Lint
docs/_docs/01_getting-started/01-quick-start.md

[failure] 324-324: Multiple consecutive blank lines
docs/_docs/01_getting-started/01-quick-start.md:324 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md


[failure] 318-318: Lists should be surrounded by blank lines
docs/_docs/01_getting-started/01-quick-start.md:318 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Generates main.tf with you..."] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md


[failure] 310-310: Lists should be surrounded by blank lines
docs/_docs/01_getting-started/01-quick-start.md:310 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Downloads your remote OpenTo..."] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md

🪛 GitHub Actions: Markdown Lint
docs/_docs/01_getting-started/01-quick-start.md

[error] 310-310: markdownlint MD032: Lists should be surrounded by blank lines.

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Test (AWS Tofu)
  • GitHub Check: Build (linux/amd64)
  • GitHub Check: Test (Fixtures Terraform 1.11)
  • GitHub Check: Test (macos)
  • GitHub Check: Test (ubuntu)
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: build-and-test
🔇 Additional comments (4)
test/fixtures/docs/01-quick-start/step-05.1/.gitignore (1)

1-2: LGTM.
The .gitignore appropriately excludes the Terragrunt cache directory and the generated hi.txt files, keeping the test fixture directory clean.

test/fixtures/docs/01-quick-start/step-05.1/foo/terragrunt.hcl (1)

1-8: Configuration correct.
This Terragrunt configuration properly references the shared module and passes the dynamic output_dir via get_terragrunt_dir() along with the content input as intended.

test/fixtures/docs/01-quick-start/step-05.1/bar/terragrunt.hcl (1)

1-8: Configuration correct.
The bar example mirrors foo and correctly demonstrates the same pattern of controlling output directory via get_terragrunt_dir().

docs/_docs/01_getting-started/01-quick-start.md (1)

1-12: Sync changes to docs-starlight directory
To keep the Jekyll-based docs in sync with the new Astro/Starlight site, please apply equivalent edits in the corresponding file under docs-starlight/01-getting-started/01-quick-start.md.

Copy link
Collaborator

@yhakbar yhakbar left a comment

Choose a reason for hiding this comment

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

There are some inaccuracies that need to be fixed here. Make sure to address the lint errors as well.

Also, note that our docs updates have to be duplicated while we're moving folks over to the new terragrunt-v1.gruntwork.io docs:
https://github.com/gruntwork-io/terragrunt/blob/main/docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx

@james03160927
Copy link
Contributor Author

There are some inaccuracies that need to be fixed here. Make sure to address the lint errors as well.

Also, note that our docs updates have to be duplicated while we're moving folks over to the new terragrunt-v1.gruntwork.io docs: https://github.com/gruntwork-io/terragrunt/blob/main/docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx

Addressed your comments. Thanks for the review!

Copy link
Contributor

@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 (4)
docs/_docs/01_getting-started/01-quick-start.md (4)

309-313: Surround list with blank lines for proper Markdown formatting
MarkdownLint (MD032) reports that lists should be surrounded by blank lines. Add a blank line before the first bullet (line 310) and after the last bullet (line 313) to improve rendering.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

310-310: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


315-318: Remove trailing whitespace and extra blank lines
Line 315 has trailing spaces (MD009) and there are two consecutive blank lines at 316–317 (MD012). Trim the trailing space on line 315 and collapse the blank lines into a single blank line to satisfy lint rules.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

315-315: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


320-330: Enhance shared/main.tf example with variable metadata
To improve clarity, consider adding a description and type for the new output_dir variable. For instance:

variable "output_dir" {
  description = "Directory path where generated files will be written"
  type        = string
}

This helps readers understand the expected input.


332-342: Clarify the scope of the snippet
This example shows the bar/terragrunt.hcl configuration. To avoid confusion, either label it explicitly (e.g., add a heading #### bar/terragrunt.hcl) or present both foo and bar snippets side-by-side.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce3039 and c05dcda.

📒 Files selected for processing (2)
  • docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx (1 hunks)
  • docs/_docs/01_getting-started/01-quick-start.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.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 under...

docs/**/*.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 in docs to the Starlight + Astro based documentation in docs-starlight. Whenever changes are made to the docs directory, ensure that an equivalent change is made in the docs-starlight directory to keep the docs-starlight documentation accurate.

  • docs/_docs/01_getting-started/01-quick-start.md
🪛 markdownlint-cli2 (0.17.2)
docs/_docs/01_getting-started/01-quick-start.md

310-310: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


315-315: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


319-319: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (1)
docs/_docs/01_getting-started/01-quick-start.md (1)

1-11: Missing mirror updates in docs-starlight
We've updated the Quick Start guide in docs/_docs/.... Please ensure the equivalent changes are applied under docs-starlight/01-getting-started/01-quick-start.mdx to keep both documentation sites in sync.

Do you want me to generate the corresponding edits for the Starlight docs?

Copy link
Contributor

@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

🔭 Outside diff range comments (1)
docs/_docs/01_getting-started/01-quick-start.md (1)

1-537: 🛠️ Refactor suggestion

Mirror these documentation updates in the Starlight site.
Since you’re migrating to Starlight + Astro, please ensure all of the above changes are also applied to docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx so both docs remain in sync.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~42-~42: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...nderstanding of what OpenTofu/Terraform do. 3. You are using a Unix-like operating...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...nding of what OpenTofu/Terraform do. 3. You are using a Unix-like operating system....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~49-~49: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...have any experience with Terragrunt. 3. You have any existing Terragrunt, OpenTofu ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Consider removing “of” to be more concise
Context: ...cussing Terragrunt. Finally, note that all of the files created in this tutorial can be c...

(ALL_OF_THE)


[style] ~132-~132: Consider using “comfortable using”.
Context: ...g into common problems. As you get more comfortable with using Terragrunt on larger projects, you may ...

(COMFORTABLE_WITH_VBG)


[grammar] ~134-~134: Consider removing ‘would’. (Usually, ‘would’ does not occur in a conditional clause, unless to make a request or give a polite order.)
Context: ... the extra information helpful. If you would prefer that Terragrunt output look more like t...

(CONDITIONAL_CLAUSE)


[style] ~181-~181: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ble to avoid duplicating effort when we make changes to our infrastructure. ### Step 3: Create...

(MAKE_CHANGES)


[style] ~185-~185: Consider shortening or rephrasing this to strengthen your wording.
Context: ... both foo and bar. This way, we can make changes to our infrastructure in one place and hav...

(MAKE_CHANGES)


[uncategorized] ~309-~309: Possible missing comma found.
Context: ...irectory serves as Terragrunt's scratch directory where it: - Downloads your remote Open...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~417-~417: Interjections are usually punctuated.
Context: ...locks-and-attributes/#dependencies ``` Oh no! We got an error. This happens becau...

(INTERJECTIONS_PUNCTUATION)


[grammar] ~478-~478: The verb ‘apply’ does not usually follow articles like ‘an’. Check that ‘apply’ is spelled correctly; using ‘apply’ as a noun may be non-standard.
Context: ...nvalid configurations, note that during an apply, the outputs of foo will be known, an...

(A_INFINITIVE)

🧹 Nitpick comments (4)
docs/_docs/01_getting-started/01-quick-start.md (4)

309-315: Refactor description of the cache directory for clarity.
The sentence

“This cache directory serves as Terragrunt's scratch directory where it:”
feels a bit cumbersome. Consider splitting it into two for better readability, for example:

- This cache directory serves as Terragrunt's scratch directory where it:
+ This cache directory serves as Terragrunt's scratch space. It:
🧰 Tools
🪛 LanguageTool

[uncategorized] ~309-~309: Possible missing comma found.
Context: ...irectory serves as Terragrunt's scratch directory where it: - Downloads your remote Open...

(AI_HYDRA_LEO_MISSING_COMMA)


316-318: Clarify the effect of the configuration change.
The transition sentence

“With this configuration, the hi.txt files will be created directly in the foo and bar directories instead of the .terragrunt-cache directory.”
could be more concise. For example:

- With this configuration, the `hi.txt` files will be created directly in the `foo` and `bar` directories instead of the `.terragrunt-cache` directory.
+ As a result, `hi.txt` is written directly into each unit’s directory instead of `.terragrunt-cache`.

320-329: Ensure HCL snippet is fully contextualized.
The new shared/main.tf example correctly adds an output_dir variable, but readers would benefit from a brief lead-in. For instance, add a sentence like:

Modify your shared module to accept an output_dir parameter:
before the code block. This sets context and highlights the purpose of the snippet.


332-343: Align terragrunt.hcl example formatting and commentary.
In the foo/terragrunt.hcl / bar/terragrunt.hcl snippet, consider:

  • Adding an inline comment to explain get_terragrunt_dir(), e.g.:
    inputs = {
      output_dir = get_terragrunt_dir()    # Points to the current unit directory
      content    = "Hello from bar, Terragrunt!"
    }
  • Verifying that indentation matches surrounding blocks for consistency.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c05dcda and cf33a70.

📒 Files selected for processing (1)
  • docs/_docs/01_getting-started/01-quick-start.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.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 under...

docs/**/*.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 in docs to the Starlight + Astro based documentation in docs-starlight. Whenever changes are made to the docs directory, ensure that an equivalent change is made in the docs-starlight directory to keep the docs-starlight documentation accurate.

  • docs/_docs/01_getting-started/01-quick-start.md
🪛 LanguageTool
docs/_docs/01_getting-started/01-quick-start.md

[uncategorized] ~309-~309: Possible missing comma found.
Context: ...irectory serves as Terragrunt's scratch directory where it: - Downloads your remote Open...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Test (macos)
  • GitHub Check: Test (ubuntu)
  • GitHub Check: lint
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval

Copy link
Collaborator

@yhakbar yhakbar left a comment

Choose a reason for hiding this comment

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

I think, on the whole, we can merge this in even with my suggestion. We can edit afterwards. It's a major improvement to the docs.

- Downloads your remote OpenTofu/Terraform configurations
- Runs your OpenTofu/Terraform commands
- Stores downloaded modules and providers
- Stores generated files (in this case, the `hi.txt` file will be created under `.terragrunt-cache/[HASH]/[HASH]/hi.txt` rather than directly in the `foo` or `bar` directories)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can cut this. We mention this in the next line, and "generated files" is confusing in this context. OpenTofu/Terraform generates this file, not Terragrunt.

@@ -315,6 +315,42 @@ You can also see what to expect in your filesystem at each step [here](https://g

This is where that additional verbosity in Terragrunt logging is really handy. You can see that Terragrunt concurrently ran `apply -auto-approve` in both the `foo` and `bar` units. The extra logging for Terragrunt also included information on the names of the units that were processed, and disambiguated the output from each unit.

When Terragrunt runs these commands, it creates a `.terragrunt-cache` directory in each unit's directory. This cache directory serves as Terragrunt's scratch directory where it:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is all good content!

- Downloads your remote OpenTofu/Terraform configurations
- Runs your OpenTofu/Terraform commands
- Stores downloaded modules and providers
- Stores generated files (in this case, the `hi.txt` file will be created under `.terragrunt-cache/[HASH]/[HASH]/hi.txt` rather than directly in the `foo` or `bar` directories)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make sure to replicate the edit between these two if you accept the suggestion above.

@yhakbar yhakbar merged commit 5874dbb into main May 20, 2025
57 of 61 checks passed
@yhakbar yhakbar deleted the quick_start_update branch May 20, 2025 23:29
@james03160927
Copy link
Contributor Author

Thanks for taking care of it @yhakbar! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick Start should be updated
2 participants