Skip to content

feat: Adding custom default template #3658 #4035

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

Conversation

tgeijg
Copy link
Contributor

@tgeijg tgeijg commented Mar 18, 2025

Description

Fixes #3658.

Adds support for a custom default boilerplate template

TODOs

  • [ v ] Update the docs.
  • [ v ] Run the relevant tests successfully, including pre-commit checks.
  • [ v ] Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added support for a custom default boilerplate template

Summary by CodeRabbit

  • Bug Fixes

    • Corrected a typographical error affecting module description handling.
  • New Features

    • Added a default template configuration option, enabling custom scaffolding workflows.
    • Enhanced the scaffolding process with improved template handling and downloading for a smoother user experience.
  • Documentation

    • Updated catalog documentation to clarify module discovery and table interactions.
    • Revised scaffolding guides to explain three mechanisms for specifying custom boilerplate templates.

Copy link

vercel bot commented Mar 18, 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 Mar 31, 2025 10:11pm

Copy link
Contributor

coderabbitai bot commented Mar 18, 2025

📝 Walkthrough

Walkthrough

This pull request introduces several changes across the codebase. A typographical error is fixed in the catalog module’s constant name. The catalog configuration is enhanced with a new DefaultTemplate field, accompanied by updated normalization logic and test cases. Documentation for both the catalog and scaffolding features is updated to clarify custom templating options. Additionally, a new configuration file is added and the scaffolding functionality is refactored, separating template downloading and default generation into distinct functions.

Changes

Files Change Summary
cli/commands/catalog/module/module.go Fixed typo: renamed constant maxDescriptionLenght to maxDescriptionLength.
config/catalog.go, config/catalog_test.go, test/fixtures/catalog/config4.hcl Added new DefaultTemplate field to CatalogConfig with corresponding updates to the normalization logic, string representation, and test coverage.
docs/_docs/02_features/05-catalog.md, docs/_docs/02_features/06-scaffold.md Revised documentation to clarify catalog behavior, module scanning, and scaffolding interactions including custom template configuration.
cli/commands/scaffold/scaffold.go Refactored scaffolding logic; introduced generateDefaultTemplate and downloadTemplate functions; updated the internals of prepareBoilerplateFiles.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant S as Scaffold Command
    participant P as prepareBoilerplateFiles
    participant D as downloadTemplate
    participant G as generateDefaultTemplate

    U->>S: Execute `terragrunt scaffold`
    S->>P: Call prepareBoilerplateFiles with template URL and tempDir
    alt Template URL provided
      P->>D: Invoke downloadTemplate
      D-->>P: Return downloaded template path
    else No template URL provided
      P->>G: Check catalog config for DefaultTemplate
      G-->>P: Return generated default template path
    end
    P-->>S: Return final boilerplate files path
Loading

Assessment against linked issues

Objective Addressed Explanation
Override default terragrunt boilerplate template via catalog config (#3658)

Suggested labels

preserved

Suggested reviewers

  • denis256
  • levkohimins
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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 (5)
config/catalog.go (1)

48-59: Consider extending normalize method for DefaultTemplate path.

The normalize method currently only transforms relative paths to absolute ones for URLs, but it doesn't do the same for the DefaultTemplate field. If DefaultTemplate can also be a relative path, consider applying the same normalization.

func (cfg *CatalogConfig) normalize(configPath string) {
	configDir := filepath.Dir(configPath)

	// transform relative paths to absolute ones
	for i, url := range cfg.URLs {
		url := filepath.Join(configDir, url)

		if files.FileExists(url) {
			cfg.URLs[i] = url
		}
	}
+
+	// Normalize DefaultTemplate path if it's not empty and exists
+	if cfg.DefaultTemplate != "" {
+		path := filepath.Join(configDir, cfg.DefaultTemplate)
+		if files.FileExists(path) {
+			cfg.DefaultTemplate = path
+		}
+	}
}
docs/_docs/02_features/06-scaffold.md (1)

71-76: Refactor the bullet list structure to avoid repetition and enhance clarity.

The current bullet list repeats "1." for each item, and each item starts with "You can" in close succession. Consider applying sequential numbering or using another format while rephrasing to reduce redundancy. For example:

-1. You can specify a custom boilerplate template ...
-1. You can define a custom boilerplate template ...
-1. You can define a default custom boilerplate template ...
+1. You can specify a custom boilerplate template ...
+2. You can define a custom boilerplate template ...
+3. You can define a default custom boilerplate template ...
🧰 Tools
🪛 LanguageTool

[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... subfolder of your Terraform module. 1. You can define a default custom boilerplate...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/_docs/02_features/05-catalog.md (2)

26-26: Fix grammatical errors in the repository search description.

Use “is” instead of “are” and resolve capitalization to match sentence boundaries:

-1. The repository list are searched in the [config file](#configuration) ...
-   if `terragrunt.hcl` does not exist in the current directory, the config are searched ...
+1. The repository list is searched in the [config file](#configuration) ...
+   If `terragrunt.hcl` does not exist in the current directory, the config is searched ...
🧰 Tools
🪛 LanguageTool

[uncategorized] ~26-~26: The verb “are” doesn’t seem to fit in this context, “is” is probably more formally correct.
Context: ...ory, otherwise: 1. The repository list are searched in the [config file](#configur...

(AI_HYDRA_LEO_CPT_ARE_IS)


[uncategorized] ~26-~26: The verb “are” doesn’t seem to fit in this context, “is” is probably more formally correct.
Context: ...st in the current directory, the config are searched in the parent directories. 1. ...

(AI_HYDRA_LEO_CPT_ARE_IS)


65-65: Add missing article and punctuation for clarity.

Insert "the" before "flag" and a comma after "provided":

-If flag is not provided current working directory is selected.
+If the flag is not provided, the current working directory is selected.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~65-~65: You might be missing the article “a” here.
Context: ...tion for generated terragrunt.hcl. If flag is not provided current working directo...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~65-~65: Possible missing comma found.
Context: ...erated terragrunt.hcl. If flag is not provided current working directory is selected.

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~65-~65: Possible missing article found.
Context: ...erragrunt.hcl`. If flag is not provided current working directory is selected.

(AI_HYDRA_LEO_MISSING_THE)

cli/commands/scaffold/action.go (1)

268-315: Validate fallback flows in prepareBoilerplateFiles.

This method has multiple fallback paths when neither a custom template URL nor a default template is specified. Consider adding a dedicated unit test (or expanding existing tests) to verify each fallback scenario for correctness and to guard against regressions.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8eb9946 and 679fa0c.

📒 Files selected for processing (7)
  • cli/commands/catalog/module/module.go (2 hunks)
  • cli/commands/scaffold/action.go (1 hunks)
  • config/catalog.go (1 hunks)
  • config/catalog_test.go (1 hunks)
  • docs/_docs/02_features/05-catalog.md (2 hunks)
  • docs/_docs/02_features/06-scaffold.md (1 hunks)
  • test/fixtures/catalog/config4.hcl (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.go`: Review the Go code for quality and correctness. M...

**/*.go: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

  • config/catalog.go
  • config/catalog_test.go
  • cli/commands/catalog/module/module.go
  • cli/commands/scaffold/action.go
`docs/**/*.md`: Review the documentation for clarity, gramma...

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/02_features/06-scaffold.md
  • docs/_docs/02_features/05-catalog.md
🪛 LanguageTool
docs/_docs/02_features/06-scaffold.md

[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... subfolder of your Terraform module. 1. You can define a default custom boilerplate...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/_docs/02_features/05-catalog.md

[uncategorized] ~26-~26: The verb “are” doesn’t seem to fit in this context, “is” is probably more formally correct.
Context: ...ory, otherwise: 1. The repository list are searched in the [config file](#configur...

(AI_HYDRA_LEO_CPT_ARE_IS)


[uncategorized] ~26-~26: The verb “are” doesn’t seem to fit in this context, “is” is probably more formally correct.
Context: ...st in the current directory, the config are searched in the parent directories. 1. ...

(AI_HYDRA_LEO_CPT_ARE_IS)


[uncategorized] ~65-~65: You might be missing the article “a” here.
Context: ...tion for generated terragrunt.hcl. If flag is not provided current working directo...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~65-~65: Possible missing comma found.
Context: ...erated terragrunt.hcl. If flag is not provided current working directory is selected.

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~65-~65: Possible missing article found.
Context: ...erragrunt.hcl`. If flag is not provided current working directory is selected.

(AI_HYDRA_LEO_MISSING_THE)

🔇 Additional comments (8)
config/catalog.go (2)

40-41: LGTM: New DefaultTemplate field added properly.

This correctly adds the DefaultTemplate field to the CatalogConfig struct with appropriate HCL and CTY tags for serialization, aligning with the PR objectives for supporting custom default templates.


44-46: String() method updated to include the DefaultTemplate field.

The String() method is correctly updated to include the new DefaultTemplate field in its representation, maintaining consistency in the struct's string output.

test/fixtures/catalog/config4.hcl (1)

1-7: LGTM: Test fixture for DefaultTemplate created.

This test fixture correctly defines the catalog block with the default_template field, which aligns with the changes made to the CatalogConfig struct. The locals block with the baseRepo variable is also properly defined.

config/catalog_test.go (1)

128-134: LGTM: Test case added for DefaultTemplate configuration.

This test case properly validates that the DefaultTemplate field is correctly parsed from the configuration file. It checks that when reading config4.hcl, the resulting CatalogConfig object has the DefaultTemplate field set to "/test/fixtures/scaffold/external-template" with no error.

cli/commands/catalog/module/module.go (2)

15-15: Fixed typo in constant name: maxDescriptionLength.

Good catch correcting the typo in the constant name from maxDescriptionLenght to maxDescriptionLength. This improves code readability and maintainability.


89-89: Updated usage of renamed constant.

The usage of the renamed constant is properly updated in the Description method.

cli/commands/scaffold/action.go (2)

224-236: Well-structured approach to generating default files.

The generateDefaultTemplate function correctly writes both terragrunt.hcl and boilerplate.yml with proper permissions and handles errors gracefully.


238-266: Good modular design for template parsing and file retrieval.

Splitting out parseTemplateURL clarifies responsibilities and promotes maintainability. The error handling is consistent and well-scoped.

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.

Left some notes. Happy to discuss further for testing.

// downloading templateURL
opts.Logger.Infof("Using template from %s", templateURL)

if _, err := getter.GetAny(ctx, templateDir, templateURL); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: Consider integrating into the CAS experiment to save you reclones of the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can have a look at doing that if I have some time, or otherwise I'll ask you for some pointers next week.

}

// if boilerplate dir is not found, create one with default template
if !files.IsExistingDir(boilerplateDir) {
// no default boilerplate dir, create one
defaultTempDir, err := os.MkdirTemp("", "boilerplate")
config, err := config.ReadCatalogConfig(ctx, opts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the right behavior here? Should scaffold always fail if the catalog config discovered in the parent directory is invalid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question. I'll leave that to your judgment. If we get to this point in the code, no Boilerplate template was provided as a cli input, and the terraform module also doesn't contain a .boilerplate folder. That leaves one of two options: either we use the custom default template in the catalog config (if there is one), or we stick to the hardcoded default template.

I can see the argument for falling back to the hardcoded custom template in case of an invalid catalog config, but that may surprise a user who thought they defined a custom default config. I would personally lean towards flagging the issue with the catalog config though, even if it doesn't actually contain a custom template. As a user I'd like to know if my config is invalid. Sooner rather than later.

@yhakbar yhakbar marked this pull request as draft March 21, 2025 14:15
@yhakbar
Copy link
Collaborator

yhakbar commented Mar 21, 2025

Moving to in-draft, as @tgeijg and I are going to go over this and testing for it next week.

@tgeijg tgeijg force-pushed the feat/adding-custom-default-template branch from 4132c5e to dfb27d0 Compare March 31, 2025 22:10
@yhakbar yhakbar marked this pull request as ready for review April 2, 2025 11:40
@yhakbar yhakbar changed the title [WIP] Feat/adding custom default template #3658 feat: Adding custom default template #3658 Apr 2, 2025
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/02_features/06-scaffold.md (1)

71-75: Consider rewording repeated sentences and fixing the "sub-directory" spelling.

The code currently repeats “You can …” at the beginning of each sentence and uses “sub-directory” with a hyphen. This can be more concise and consistent:

-1. You can specify a custom Boilerplate template to use as the second argument of the `scaffold` command.
-1. You can define a custom Boilerplate template in a `.boilerplate` sub-directory of any OpenTofu/Terraform module.
-1. You can define a default custom Boilerplate template in the [catalog config]({{site.baseurl}}/docs/features/catalog/#configuration)
+1. Provide a custom Boilerplate template as the second argument of the `scaffold` command.
+1. Place a custom Boilerplate template in a `.boilerplate` subdirectory of any OpenTofu/Terraform module.
+1. Specify a default custom Boilerplate template in the [catalog config]({{site.baseurl}}/docs/features/catalog/#configuration)
🧰 Tools
🪛 LanguageTool

[misspelling] ~74-~74: This word is normally spelled as one.
Context: ...oilerplate template in a .boilerplate sub-directory of any OpenTofu/Terraform module. 1. Yo...

(EN_COMPOUNDS_SUB_DIRECTORY)


[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ry of any OpenTofu/Terraform module. 1. You can define a default custom Boilerplate...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/_docs/02_features/05-catalog.md (2)

41-41: Use “subdirectory” as one word.

To align with standard spelling norms, remove the hyphen in “sub-directory”:

-1. You can define a custom Boilerplate template in a `.boilerplate` sub-directory of any OpenTofu/Terraform module.
+1. You can define a custom Boilerplate template in a `.boilerplate` subdirectory of any OpenTofu/Terraform module.
🧰 Tools
🪛 LanguageTool

[misspelling] ~41-~41: This word is normally spelled as one.
Context: ...oilerplate template in a .boilerplate sub-directory of any OpenTofu/Terraform module. 1. Yo...

(EN_COMPOUNDS_SUB_DIRECTORY)


66-66: Add the missing article “the” when referencing the flag.

Improve clarity by specifying "the flag" rather than "flag":

-- `--output-folder` - Location for the scaffolded configurations. If flag is not provided current working directory is selected.
+- `--output-folder` - Location for the scaffolded configurations. If the flag is not provided, the current working directory is selected.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~66-~66: You might be missing the article “a” here.
Context: ...n for the scaffolded configurations. If flag is not provided current working directo...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

cli/commands/scaffold/scaffold.go (1)

238-266: Consider wrapping errors with contextual information.

When errors occur (e.g., downloading the template), returning them with additional context helps with debugging. For instance:

- return "", errors.New(err)
+ return "", errors.Wrapf(err, "failed to download template from %s", templateURL)
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 679fa0c and dfb27d0.

📒 Files selected for processing (7)
  • cli/commands/catalog/module/module.go (2 hunks)
  • cli/commands/scaffold/scaffold.go (1 hunks)
  • config/catalog.go (2 hunks)
  • config/catalog_test.go (1 hunks)
  • docs/_docs/02_features/05-catalog.md (2 hunks)
  • docs/_docs/02_features/06-scaffold.md (1 hunks)
  • test/fixtures/catalog/config4.hcl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • config/catalog.go
  • config/catalog_test.go
  • test/fixtures/catalog/config4.hcl
  • cli/commands/catalog/module/module.go
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.go`: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

**/*.go: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

  • cli/commands/scaffold/scaffold.go
`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/02_features/05-catalog.md
  • docs/_docs/02_features/06-scaffold.md
🪛 LanguageTool
docs/_docs/02_features/05-catalog.md

[misspelling] ~41-~41: This word is normally spelled as one.
Context: ...oilerplate template in a .boilerplate sub-directory of any OpenTofu/Terraform module. 1. Yo...

(EN_COMPOUNDS_SUB_DIRECTORY)


[uncategorized] ~66-~66: You might be missing the article “a” here.
Context: ...n for the scaffolded configurations. If flag is not provided current working directo...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

docs/_docs/02_features/06-scaffold.md

[misspelling] ~74-~74: This word is normally spelled as one.
Context: ...oilerplate template in a .boilerplate sub-directory of any OpenTofu/Terraform module. 1. Yo...

(EN_COMPOUNDS_SUB_DIRECTORY)


[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ry of any OpenTofu/Terraform module. 1. You can define a default custom Boilerplate...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
  • GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (2)
cli/commands/scaffold/scaffold.go (2)

224-236: Implementation looks good.

File creation, permission settings, and error handling are all correctly handled.


268-315: Logic for handling fallback templates and default configurations appears correct.

The approach of checking for a .boilerplate folder, then the DefaultTemplate, and finally reverting to the internal default is well-structured.

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.

Looks good, @tgeijg!

There's a small markdown issue that can be resolved after merge. Thanks for your contribution!

@@ -23,13 +23,31 @@ terragrunt catalog <repo-url> [--no-include-root] [--root-file-name] [--output-f

If `<repo-url>` is provided, the repository will be cloned into a temporary directory, otherwise:

1. The repository list are searched in the config file `terragrunt.hcl`. if `terragrunt.hcl` does not exist in the current directory, the config are searched in the parent directories.
1. The `urls` listed in the `catalog` configuration of your [parent configuration file](#configuration) are used. If the root configuration file does not exist in the current directory, parent directories are recursively searched.
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • @yhakbar Make sure to copy this update to the starlight docs.

@yhakbar yhakbar merged commit 940d66b into gruntwork-io:main Apr 2, 2025
7 of 9 checks passed
yhakbar added a commit that referenced this pull request Apr 2, 2025
@yhakbar yhakbar mentioned this pull request Apr 2, 2025
4 tasks
yhakbar added a commit that referenced this pull request Apr 2, 2025
* fix: Fixing markdownlint findings

* feat: Adding content from #4035 to Starlight docs

* fix: Removing invalid hash for link
@coderabbitai coderabbitai bot mentioned this pull request Apr 8, 2025
4 tasks
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.

Add option to override default terragrunt boilerplate template for terragrunt catalog
2 participants