Hey <@U01G5T1P3BL> <@U01G5T3C76W> while working on...
# contributors
n
Hey @little-author-61621 @white-airport-8778 while working on this issue when I ran
infracost breakdown --path ./examples/terragrunt
it works perfectly but when with
--terraform-force-cli
flags it gives this error
Copy code
infracost breakdown --path ./examples/terragrunt --terraform-force-cli
warning: GOCOVERDIR not set, no coverage data emitted
INFO Autodetected 1 Terragrunt CLI project across 1 root module
INFO Found Terragrunt CLI project .-examples-terragrunt at directory ./examples/terragrunt


Project: ptdatta/infracost/examples/terragrunt/examples/terragrunt
Module path: ./examples/terragrunt

Errors:
  terragrunt run-all terragrunt-info failed:
    exit status 1

  Terragrunt command failed with:
    18:03:04.802 WARN   The `run-all` command is deprecated and will be removed in a future version of Terragrunt. Use `terragrunt run --all` instead.
    18:03:04.803 WARN   The `--terragrunt-ignore-external-dependencies` flag is deprecated and will be removed in a future version of Terragrunt. Use `--queue-exclude-external` instead.
    18:03:04.804 WARN   [dev] Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see <https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl>
    18:03:04.805 INFO   The stack at . will be processed in the following order for command terragrunt-info:
    Group 1
    - Module ./dev
    - Module ./prod
    18:03:04.831 INFO   [prod] Downloading Terraform configurations from . into ./prod/.terragrunt-cache/HXllD1jsGj1R0fk_KNKquyz0C9U/sIz5igRzN9muwhtdER-KzPYNu2Q
    18:03:04.831 INFO   [dev] Downloading Terraform configurations from . into ./dev/.terragrunt-cache/fZmjIXQi99oKF2A5m4yLXbfTzV8/sIz5igRzN9muwhtdER-KzPYNu2Q
    18:03:04.851 STDERR [dev] terraform:
      Terraform has no command named "terragrunt-info".
    18:03:04.851 STDERR [dev] terraform:
        To see all of Terraform's top-level commands, run:
    18:03:04.852 STDERR [dev] terraform:
            terraform -help
    18:03:04.852 STDERR [prod] terraform:
            Terraform has no command named "terragrunt-info".
    18:03:04.852 STDERR [prod] terraform:
              To see all of Terraform's top-level commands, run:
    18:03:04.852 STDERR [prod] terraform:
                  terraform -help
    18:03:04.853 ERROR  [dev] terraform invocation failed in ./dev/.terragrunt-cache/fZmjIXQi99oKF2A5m4yLXbfTzV8/sIz5igRzN9muwhtdER-KzPYNu2Q/modules/example
    18:03:04.853 ERROR  [dev] Module ./dev has finished with an error
    18:03:04.853 ERROR  [prod] terraform invocation failed in ./prod/.terragrunt-cache/HXllD1jsGj1R0fk_KNKquyz0C9U/sIz5igRzN9muwhtdER-KzPYNu2Q/modules/example
    18:03:04.853 ERROR  [prod] Module ./prod has finished with an error
    18:03:04.854 ERROR  Run failed:
                  2 errors occurred:
    * Failed to execute "terraform terragrunt-info" in ./dev/.terragrunt-cache/fZmjIXQi99oKF2A5m4yLXbfTzV8/sIz5igRzN9muwhtdER-KzPYNu2Q/modules/example
      Terraform has no command named "terragrunt-info".
      
      To see all of Terraform's top-level commands, run:
        terraform -help
      
      
      exit status 1
    * Failed to execute "terraform terragrunt-info" in ./prod/.terragrunt-cache/HXllD1jsGj1R0fk_KNKquyz0C9U/sIz5igRzN9muwhtdER-KzPYNu2Q/modules/example
      Terraform has no command named "terragrunt-info".
      
      To see all of Terraform's top-level commands, run:
        terraform -help
      
      
      exit status 1

See <https://infracost.io/troubleshoot> for how to generate multiple Terraform plan JSON files for your Terragrunt project, and use them with Infracost.

 OVERALL TOTAL       $0.00 

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

──────────────────────────────────
No cloud resources were detected

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Project                                                   ┃ Baseline cost ┃ Usage cost* ┃ Total cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━┫
┃ ptdatta/infracost/examples/terragrunt/examples/terragrunt ┃         $0.00 ┃           - ┃      $0.00 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━┛
Without
--terraform-force-cli
infracost uses it's internal parsing logic but with that flag it delegates execution to Terragrunt CLI which fails as
terragrunt-info
is a Terragrunt helper command and is not handled properly in this CLI delegation flow. Am I thinking correctly?
l
@narrow-pizza-69955 correct, we’ve actually since deprecated the
--terraform-force-cli
option so we can probably just close this issue.
n
Ooh ok. Please review these ones.