Shape
Shape

Catalog

Catalog

Catalog

Launch the user interface for searching and managing your module catalog.

Example:

terragrunt catalog <repo-url>

screenshot

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.
  2. If the repository list is not found in the configuration file, the modules are looked for in the current directory.

An example of how to define the list of repositories for the catalog command in the terragrunt.hcl configuration file:

catalog {
  urls = [
    "relative/path/to/repo", # will be converted to the absolute path, relative to the path of the configuration file.
    "/absolute/path/to/repo",
    "github.com/gruntwork-io/terraform-aws-lambda", # url to remote repository
    "http://github.com/gruntwork-io/terraform-aws-lambda", # same as above
  ]
}

This will recursively search for Terraform modules in the root of the repo and the modules directory and show a table with all the modules. You can then:

  1. Search and filter the table: / and start typing.
  2. Select a module in the table: use the arrow keys to go up and down and next/previous page.
  3. See the docs for a selected module: ENTER.
  4. Use terragrunt scaffold to render a terragrunt.hcl for using the module: S.