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.
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. Theproviderscommand 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
runcommand. Running the command similar toterragrunt run -- providers schema -json. For the run-all type, the command should be ran similar toterragrunt run --all -- providers schema -jsonIf 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:
./terragrunt.hcl:
Run:
Expected behavior
No errors when running with a terragrunt version greater than or equal to v0.88.0
Desktop (please complete the following information):
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.