Skip to content

Terragrunt and terragrunt run-all types incompatible with v0.88.0 and up #230

@adhuber

Description

@adhuber

Describe the bug

Starting with terragrunt version v0.88.0, terragrunt no longer forwards unknown top-level commands.

When terratag runs with the terragrunt type, it runs the command as terragrunt providers schema -json. The providers command is not a supported shortcut and is being treated as unknown. Which causes terratag to fail when the version of terragrunt is v0.88.0 or higher.

The best way to continue support for terragrunt, would be to utilize the run command. Running the command similar to terragrunt run -- providers schema -json. For the run-all type, the command should be ran similar to terragrunt run --all -- providers schema -json

If you wish to support versions of terragrunt below v0.73.0, the current implementation must be maintained. As the run command did not exist prior to that version.

To Reproduce (terragrunt)

Create the following files:

terraform/main.tf:

provider "aws" {
  region = "us-east-1"
}

resource "aws_cloudwatch_log_group" "this" {
  name = "test-loggroup"
}

./terragrunt.hcl:

terraform {
    source = "./terraform"
}

Run:

terragrunt init
terratag -type="terragrunt" -dir="." -tags='{"some_tag": "some_value"}'

Expected behavior

No errors when running with a terragrunt version greater than or equal to v0.88.0

Desktop (please complete the following information):

  • OS: Debian (devcontainer)
  • Terraform version: v1.5.7
  • Terragrunt version: 0.93.12

Additional context

The above reproduction steps work when the version of terragrunt is below v0.88.0. For example, I tested the above steps with terragrunt v0.87.0 and it worked without any errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions