Skip to content

Conversation

@pedromtsilva
Copy link

@pedromtsilva pedromtsilva commented Sep 27, 2025

Updated command examples for clarity and accuracy regarding the use of the 'run' command in Terragrunt CLI, which was presenting itself with a repeated command definition.

Also changed upper reference regarding the graph flag to match the definition on the bottom of the page.

Description

Fixes #4892.

TODOs

Read the Gruntwork contribution guidelines.

  • I authored this code entirely myself
  • I am submitting code based on open source software (e.g. MIT, MPL-2.0, Apache)]
  • I am adding or upgrading a dependency or adapted code and confirm it has a compatible open source license
  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Summary by CodeRabbit

  • Documentation
    • Updated migration guide to reflect revised CLI usage and examples.
    • Corrected command examples (e.g., use terragrunt run --graph plan).
    • Fixed spacing/flag formatting in code snippets (e.g., removed extra spaces).
    • Replaced prose references of “run --all” with “run-all” and updated Before/After snippets for clarity.

Updated command examples for clarity and accuracy regarding the use of the 'run' command in Terragrunt CLI, which was presenting itself with a repeated command definition.

Also changed upper reference regarding the `graph` flag to match the definition on the bottom of the page.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

📝 Walkthrough

Walkthrough

Updated the CLI-redesign migration docs: corrected command examples and prose to use the intended run vs run-all forms, fixed flag formatting (explicit -- separation and --graph usage), and removed an extra space in a code fence. Changes are documentation-only.

Changes

Cohort / File(s) Summary of Changes
Docs: CLI redesign migration guide
docs-starlight/src/content/docs/07-migrate/03-cli-redesign.md
Edited examples and explanatory text: replaced incorrect/mismatched run vs run-all usages, changed terragrunt run graphterragrunt run --graph plan, ensured explicit -- before Terraform/OpenTofu flags, and removed an extra space in a code block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • denis256
  • yhakbar

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning In addition to the run-all formatting updates required by the linked issue, this pull request alters the graph flag example, which was not specified in issue #4892 and therefore represents an out-of-scope change. Consider moving the graph flag adjustment into a separate pull request or updating the linked issue to include this change to keep each PR focused on its original scope.
Description Check ⚠️ Warning The pull request description references the linked issue and includes a TODO checklist but does not include the detailed summary of changes under the Description header as required by the template and omits the Release Notes section entirely. Please provide a concise description of the changes introduced in the “Description” section following the Fixes line and add the “Release Notes” section to comply with the repository’s description template.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately describes the primary change of fixing inconsistencies in the CLI documentation and clearly conveys the main focus of the pull request in a concise manner.
Linked Issues Check ✅ Passed The changes correctly update the Before/After examples to distinguish the deprecated run-all command from the new run --all invocation and address the documentation inconsistency described in issue #4892.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 17e9d21 and ec254f0.

📒 Files selected for processing (1)
  • docs-starlight/src/content/docs/07-migrate/03-cli-redesign.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs-starlight/src/content/docs/07-migrate/03-cli-redesign.md

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

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 27, 2025 6:23pm

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: 1

📜 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 e0410b1 and 17e9d21.

📒 Files selected for processing (1)
  • docs-starlight/src/content/docs/07-migrate/03-cli-redesign.md (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/07-migrate/03-cli-redesign.md

Clarify usage of deprecated 'graph' command and flag separation.

```bash
terragrunt run graph
terragrunt run --graph plan
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wait, this is wrong. The point of the command above is that the OpenTofu/Terraform command can't be run without using the run command.

Copy link
Author

@pedromtsilva pedromtsilva Sep 29, 2025

Choose a reason for hiding this comment

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

I don't have much knowledge on this flag. CodeRabbit, when i changed it to terragrunt run --graph only, suggested the changes above.

I followed this run --graph command usage description, in the documentation. Also, here, in the new CLI redesign section, it says to use terragrunt run graph. Please indicate the right usage to correctly apply the changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know it's confusing, but there are two different graph commands, which drove some of the adjustments in the CLI Redesign project.

For some OpenTofu/Terraform commands, if there's no ambiguity, we directly forward the command from Terragrunt to OpenTofu/Terraform.

e.g.

terragrunt plan

Under the hood, calls either tofu plan or terraform plan, depending on the user's configurations.

This is just a shortcut, though, and it's the same as running the following:

terragrunt run plan

For other commands like graph, we don't want users who were using the old Terragrunt graph command to get confused when they see OpenTofu running the graph command, so we instead require that they explicitly use the run form if they want Terragrunt to run the OpenTofu command.

terragrunt run graph

You can see in the line above where you're proposing changes that we're explaining this:

Similarly, commands like graph won't be supported as a shortcut, as graph is a now deprecated command in the Terragrunt CLI. Supporting it as a shortcut would be misleading, so you can use the run command to run it explicitly:

If you think we can be clearer about the explanation, please consider updating that line to make it clearer.

@yhakbar yhakbar added the preserved Preserved issues never go stale label Oct 17, 2025
@yhakbar
Copy link
Collaborator

yhakbar commented Oct 17, 2025

Hey @pedromtsilva ,

Do you have a sec to rebase this PR and address the feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preserved Preserved issues never go stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs regarding CLI Redesign

3 participants