Skip to content

Feature Request: Support for Terragrunt Units & Stacks #371

@ddroessler-ext

Description

@ddroessler-ext

Overview

First of all thanks a lot for this awesome Action!
I am using Terraform Module Releaser in a larger mono-repo with custom Terraform Modules and Terragrunt Units+Stacks. It works like a charm for Terraform Modules. Unfortunately it does not natively support Terragrunt Units and Stacks.

Suggested Feature

Add support for Terragrunt Units & Stacks. Extend the current implementation to also generate tags & wiki entries for Terragrunt Units (found in files named terragrunt.hcl) and Terragrunt Stacks (found in files named terragrunt.stack.hcl). I managed to get the tag creation working by patching the file regex to include || file === 'terragrunt.hcl' || file === 'terragrunt.stack.hcl', but I do not know TypeScript well enough for anything more than that.

Benefits

Teams can maintain Terragrunt Units and Stacks side-by-side to Terraform Modules in a single mono-repo.

Implementation Ideas

  • Update file regex in ‎src/utils/file.ts to include Terragrunt-specific file names terragrunt.hcl and terragrunt.stack.hcl
  • Update wiki generation to differentiate between Terraform Modules, Terragrunt Units and Terragrunt Stacks, e.g., by file type/name (*.tf, or terragrunt.hcl or terragrunt.stack.hcl)
  • Update individual wiki entry generation to produce a correct Usage entry for Terragrunt Units starting with unit "<unit_name>" { ... } instead of module
  • Update individual wiki entry generation to produce a correct Usage entry for Terragrunt Stacks starting with stack"<stack_name>" { ... } instead of module
  • Optional: Generate attributes (requirements, providers, modules, inputs, outputs) for Terragrunt Units based on the referenced Terraform Module
  • Optional: Generate attributes (requirements, providers, modules, inputs, outputs) for Terragrunt Stacks based on the referenced Terragrunt Units

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions