enough-sundown-27979
03/31/2023, 3:37 PMinfracost.exe breakdown --path ./terraform/ --terraform-var-file ./vars/uat.tfvars --format json --out-file infracost-base-uat2.json
infracost.exe upload --path infracost-base-uat2.json
But when I use the comment command i am getting an error (trying to get data on the dashboard)
infracost.exe comment gitlab --repo /path/to/repo --merge-request 17 --path=infracost-base-uat2.json --gitlab-token xxxxxxxxx --gitlab-server-url <https://baseurl.com>
Estimate uploaded to organization 'xxx' in Infracost Cloud
Error: The pull request comment was generated successfully but could not be posted:
Error creating comment: 404 Not Found
Wondering if you have an idea whywhite-airport-8778
enough-sundown-27979
03/31/2023, 3:59 PMwhite-airport-8778
--repo subgroup1/subgroup2/repo
? Running with --log-level debug
might give clues tooenough-sundown-27979
03/31/2023, 4:08 PMwhite-airport-8778
infracost comment gitlab --help
to clarify thatenough-sundown-27979
03/31/2023, 4:12 PMwhite-airport-8778
git log --format='%aN <%aE>' --since=90.days -- \*.tf \*.tf.json \*.hcl \*.hcl.json \*.tfvars \*.tfvars.json \*/infracost.jml \*/infracost.yaml \*/infracost-usage.yml \*/infracost-usage.yaml | awk -F '<' '{ print $1 }' | sort | uniq
Saying that - @early-queen-42970 is chatting with users to get feedback on this and see what works for you(even if he is not the one interacting with infracost NOR going to the dashboard)this is interesting, so the engineers won’t see the merge request comment? as in, you’d use infracost for high-level visibility and guardrails mostly?
enough-sundown-27979
03/31/2023, 4:21 PMwhite-airport-8778
enough-sundown-27979
03/31/2023, 4:25 PMearly-queen-42970
enough-sundown-27979
03/31/2023, 6:08 PMinfracost.exe breakdown --path ./terraform/ --terraform-var-file ./vars/uat.tfvars --format json --out-file infracost-before-change.json
#make a terraform change
infracost.exe diff --path ./terraform/ --terraform-var-file ./vars/uat.tfvars --compare-to infracost-before-change.json --format json --out-file infracost-diff.json
infracost.exe comment gitlab --repo subgroup1/subgroup2/repo --merge-request 17 --path infracost-diff.json --gitlab-token xxxxxxxxxxx --gitlab-server-url <https://baseurl.com>
The diff is working fine by giving me an estimate of the changes, the comment appears correctly in gitlabs merge request, and the estimate shows as well in the repo tab. But nothing in dashboard and no pull request detectedwhite-airport-8778
enough-sundown-27979
03/31/2023, 6:15 PMwhite-airport-8778
export INFRACOST_VCS_PROVIDER=gitlab
export INFRACOST_VCS_REPOSITORY_URL=<https://gitlab.com/>...
export INFRACOST_VCS_PULL_REQUEST_URL=<https://gitlab.com/>...
export INFRACOST_VCS_PULL_REQUEST_AUTHOR="ali"
export INFRACOST_VCS_PULL_REQUEST_TITLE="test MR"
infracost.exe breakdown... (same commands as before)
enough-sundown-27979
03/31/2023, 6:21 PMwhite-airport-8778
enough-sundown-27979
03/31/2023, 6:25 PMwhite-airport-8778