Skip to content

Conversation

@thelizri
Copy link

@thelizri thelizri commented Sep 27, 2025

Description

This section of the documentation update focuses on providing a prominent warning in the Quick Start guide advising users not to run tofu init or terraform init when using Terragrunt.

Summary by CodeRabbit

  • Documentation
    • Added a prominent warning in the Quick Start guide advising not to run “tofu init” or “terraform init” when using Terragrunt.
    • Clarifies that Terragrunt manages its own .terraform folder and external init can cause conflicts.
    • Improves setup guidance to help users avoid misconfiguration and unexpected behavior.
    • Positioned the note near initial Terragrunt usage instructions for maximum visibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

📝 Walkthrough

Walkthrough

Inserted a warning in the Quick Start docs advising users not to run tofu init or terraform init when using Terragrunt because Terragrunt manages its own .terraform folder; placed immediately before the Terragrunt usage example.

Changes

Cohort / File(s) Summary of Changes
Docs: Quick Start note
docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx
Added a warning advising not to run tofu init or terraform init when using Terragrunt, explaining that Terragrunt maintains its own .terraform folder and local .terraform directories can interfere; inserted before the Terragrunt example code block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • denis256
  • yhakbar

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The linked issue #4874 centers on fixing a bug where Terragrunt fails to read outputs after apply, but this PR only adds a documentation warning about init commands without implementing any code changes to address the output reading problem described in the issue. Incorporate the necessary code modifications to correctly read and expose Terraform/OpenTofu outputs as outlined in issue #4874, or separate the documentation clarification into its own PR and focus this one on the bug fix.
Out of Scope Changes Check ⚠️ Warning The only change in this pull request is a documentation update about init command usage, which does not relate to the bug fix objectives for Terragrunt’s output reading behavior specified in the linked issue. Remove the documentation change or move it to a separate PR and ensure this PR exclusively contains the code changes needed to resolve the output reading issue.
Description Check ⚠️ Warning The pull request description provides a concise overview of the documentation update but does not follow the repository’s required template. It omits the mandatory “Fixes #000” line that links the issue, the TODOs checklist for contribution compliance, and the Release Notes and Migration Guide sections. As a result, the description is incomplete and does not meet the template’s structural requirements. Please update the pull request description to include “Fixes #4874” under the Description heading, complete the TODOs checklist according to the contribution guidelines, and add both the Release Notes and Migration Guide sections as specified in the repository template to ensure all required information is present.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title concisely and accurately summarizes the primary change by highlighting the added documentation clarification not to run tofu init or terraform init when using Terragrunt, making it clear and specific for reviewers scanning the history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel
Copy link

vercel bot commented Sep 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
terragrunt-docs Ready Ready Preview Comment Sep 30, 2025 6:16am

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 (1)
docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx (1)

81-81: Spell out the recovery step for existing .terraform folders

The new warning is helpful, but readers who already ran tofu init / terraform init need an explicit fix—otherwise they’ll keep hitting the broken terragrunt output flow described in #4874. Please add a short sentence telling them to delete the existing .terraform directory before re-running Terragrunt.

-   ⚠️ Important: Do not run tofu init or terraform init yourself when using Terragrunt. Terragrunt maintains its own .terraform folder, and if a .terraform folder exists in your working directory, it can interfere with Terragrunt’s behavior.
+   ⚠️ Important: Do not run `tofu init` or `terraform init` yourself when using Terragrunt. Terragrunt maintains its own `.terraform` folder, and if a `.terraform` folder exists in your working directory, it can interfere with Terragrunt’s behavior. If you already ran one of those commands, delete the local `.terraform` directory before re-running Terragrunt.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0523365 and f201b53.

📒 Files selected for processing (1)
  • docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs-starlight/**/*.md*

⚙️ CodeRabbit configuration file

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. Make sure that the docs-starlight documentation is accurate and up-to-date with the docs documentation, and that any difference between them results in an improvement in the docs-starlight documentation.

Files:

  • docs-starlight/src/content/docs/01-getting-started/01-quick-start.mdx


You can now run `terragrunt` commands within the `foo` directory, as if you were using `tofu` or `terraform`.

⚠️ Important: Do not run `tofu init` or `terraform init` yourself when using Terragrunt. Terragrunt maintains its own `.terraform` folder, and if a `.terraform` folder exists in your working directory, it can interfere with Terragrunt’s behavior. If you already ran one of those commands, delete the local `.terraform` directory before re-running Terragrunt.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't true? Can you confirm that it is?

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.

2 participants