broad-zoo-34077
11/07/2022, 4:17 PMmysterious-teacher-68276
11/07/2022, 4:18 PMpath/to/terragrunt/repo contain? Are there any .tf , .tf.json or .hcl files in that folder?fresh-refrigerator-73809
11/07/2022, 4:18 PMmysterious-teacher-68276
11/07/2022, 4:19 PMterragrunt.hcl file?fresh-refrigerator-73809
11/07/2022, 4:20 PMfresh-refrigerator-73809
11/07/2022, 4:21 PMmysterious-teacher-68276
11/07/2022, 4:21 PMpath/to/terragrunt/repo pathmysterious-teacher-68276
11/07/2022, 4:22 PMmysterious-teacher-68276
11/07/2022, 4:22 PMmysterious-teacher-68276
11/07/2022, 4:22 PMTerragrunt figures out the path to its config file according to the following rules:
mysterious-teacher-68276
11/07/2022, 4:22 PM1. The value of thecommand-line option, if specified.--terragrunt-config
2. The value of theenvironment variable, if defined.TERRAGRUNT_CONFIG
3. Afile in the current working directory, if it exists.terragrunt.hcl
4. Afile in the current working directory, if it exists.terragrunt.hcl.json
5. If none of these are found, exit with an error.
mysterious-teacher-68276
11/07/2022, 4:23 PMterragrunt-configmysterious-teacher-68276
11/07/2022, 4:23 PMinfracost breakdown --path should point to either the path where your terragrunt.hcl livesfresh-refrigerator-73809
11/07/2022, 4:29 PMfresh-refrigerator-73809
11/07/2022, 4:30 PMfresh-refrigerator-73809
11/07/2022, 4:31 PMfresh-refrigerator-73809
11/07/2022, 4:31 PMmysterious-teacher-68276
11/07/2022, 4:31 PMmysterious-teacher-68276
11/07/2022, 4:31 PMinfracost breakdown is?mysterious-teacher-68276
11/07/2022, 4:32 PMterragrunt.hcl lives at the root directory, running infracost breakdown --path . should workfresh-refrigerator-73809
11/07/2022, 4:35 PMfresh-refrigerator-73809
11/07/2022, 4:36 PMinfracost breakdown --path plan.json --format json --out-file infracost.jsonfresh-refrigerator-73809
11/07/2022, 4:36 PMfresh-refrigerator-73809
11/07/2022, 4:36 PMfresh-refrigerator-73809
11/07/2022, 4:37 PMhome/jenkins/agent/workspace/PR/root/dir/env/module/terragrunt.hcl:mysterious-teacher-68276
11/07/2022, 4:37 PMinfracost breakdown --path plan.json --format json --out-file infracost.json
^ this doesn’t look correct - this is pointing to a plan JSON. Are you running another infracost cmd?mysterious-teacher-68276
11/07/2022, 4:38 PMfresh-refrigerator-73809
11/07/2022, 4:38 PMfresh-refrigerator-73809
11/07/2022, 4:39 PMterragrunt run-all plan -out=tfplanmysterious-teacher-68276
11/07/2022, 4:39 PMfresh-refrigerator-73809
11/07/2022, 4:41 PMmysterious-teacher-68276
11/07/2022, 4:43 PMinfracost breakdown --path /home/jenkins/agent/workspace/PR/root/dir what is the error/output
2. if this errors - try running infracost breakdown --path /home/jenkins/agent/workspace/PR/root/dir --terraform-force-clifresh-refrigerator-73809
11/07/2022, 4:43 PMfresh-refrigerator-73809
11/07/2022, 6:02 PMfresh-refrigerator-73809
11/07/2022, 6:03 PMinfracost breakdown --path /home/jenkins/agent/workspace/PR/root/dir/env/ --terraform-force-cli
time="2022-11-07T17:47:08Z" level=info msg="Detected Terraform CLI at /home/jenkins/agent/workspace/PR/root/dir/env/"
time="2022-11-07T17:47:08Z" level=info msg="Starting: Running terraform plan"
Error: terraform plan failed: exit status 1
Terraform command failed with:
Error: No configuration files
Plan requires configuration to be present. Planning without a configuration
would mark everything for destruction, which is normally not what is desired.
If you would like to destroy everything, run plan with the -destroy option.
Otherwise, create a Terraform configuration file (.tf file) and try again.mysterious-teacher-68276
11/07/2022, 7:57 PMinfracost breakdown --path /home/jenkins/agent/workspace/PR/root/dir --terraform-force-cli needs to point to the directory with the terragrunt.hcl file. It seems you are running it in the /home/jenkins/agent/workspace/PR/root/dir/env/ directoryfresh-refrigerator-73809
11/08/2022, 4:09 AMfresh-refrigerator-73809
11/08/2022, 4:11 AMfresh-refrigerator-73809
11/08/2022, 4:11 AMfresh-refrigerator-73809
11/08/2022, 4:22 AMError: Failed to read the given file as a state or plan file
│
│ State read error: Error loading statefile: open output.log: no such file or
│ directory
│
│ Plan read error: open output.log: no such file or directory
╵mysterious-teacher-68276
11/08/2022, 6:44 AMfresh-refrigerator-73809
11/09/2022, 12:21 AMfresh-refrigerator-73809
11/09/2022, 12:21 AMmysterious-teacher-68276
11/09/2022, 8:30 AMinfracost breakdown using this planfresh-refrigerator-73809
11/09/2022, 3:00 PMfresh-refrigerator-73809
11/09/2022, 3:00 PMfresh-refrigerator-73809
11/09/2022, 4:23 PMfresh-refrigerator-73809
11/09/2022, 4:23 PMfresh-refrigerator-73809
11/09/2022, 4:24 PMfresh-refrigerator-73809
11/09/2022, 4:24 PMfresh-refrigerator-73809
11/09/2022, 4:25 PMinfracost comment github --path "infracost.json" ...
infracost upload --path infracost.jsonmysterious-teacher-68276
11/09/2022, 4:25 PMinfracost comment should upload the results of the PR for you, so you don’t need a upload stepfresh-refrigerator-73809
11/09/2022, 4:26 PMfresh-refrigerator-73809
11/09/2022, 4:26 PMfresh-refrigerator-73809
11/09/2022, 4:26 PMmysterious-teacher-68276
11/09/2022, 4:26 PMcommentfresh-refrigerator-73809
11/09/2022, 4:27 PMmysterious-teacher-68276
11/09/2022, 4:27 PMfresh-refrigerator-73809
11/09/2022, 4:27 PMmysterious-teacher-68276
11/09/2022, 4:33 PMinfracost comment step yet right?fresh-refrigerator-73809
11/09/2022, 4:33 PMfresh-refrigerator-73809
11/09/2022, 4:33 PMfresh-refrigerator-73809
11/09/2022, 4:34 PMError: required flag(s) "github-token", "repo" not setfresh-refrigerator-73809
11/09/2022, 4:34 PMmysterious-teacher-68276
11/09/2022, 4:34 PMinfracost comment github --path=infracost.json \
--repo=$GITHUB_REPOSITORY \
--pull-request=$PR_NUMBER `# or --commit=$GITHUB_SHA` \
--github-token=$GITHUB_TOKEN \
--behavior=updatefresh-refrigerator-73809
11/09/2022, 4:34 PMmysterious-teacher-68276
11/09/2022, 4:34 PMmysterious-teacher-68276
11/09/2022, 4:35 PMfresh-refrigerator-73809
11/09/2022, 4:36 PMfresh-refrigerator-73809
11/09/2022, 4:41 PMfresh-refrigerator-73809
11/09/2022, 4:41 PMfresh-refrigerator-73809
11/09/2022, 4:41 PMmysterious-teacher-68276
11/09/2022, 4:44 PMmysterious-teacher-68276
11/09/2022, 4:44 PM--github-api-url flag on comment