Hi, I'm using infracost with atlantis via Bitbucke...
# help
b
Hi, I'm using infracost with atlantis via Bitbucket Cloud. When it tries to add a comment it using the following:
infracost comment bitbucket --exclude-cli-output --path "/atlantis/tmp/$PULL_NUM/cost.json.*" --repo $BASE_REPO_OWNER/$BASE_REPO_NAME --pull-request $PULL_NUM --bitbucket-token user/pass --behavior update
I get the error in this screenshot
a
@bulky-boots-10226 since bitbucket doesn't support markdown expandable sections (https://jira.atlassian.com/browse/BSERV-12158), by default Infracost doesn't output the details as it's very long. Remove the
--exclude-cli-output
if you want to see the details. But in the above screenshot, I think the TF plan JSON has no baseline cost changes so that's why the title just says "monthly estimate generated" as there's no cost diff on things like instances (see https://www.infracost.io/docs/features/usage_based_resources/ for baseline vs usage costs).
b
Hi @white-airport-8778, it's new infra that I've added just for testing infracost so it theoretically is added cost that hasn't existed before hand
w
@bulky-boots-10226 did you try adding one of these example TF codes? does the TF plan command show those resources being added too?
b
I'm Europe based so it will be Monday before I get a chance to test this out
Hi @white-airport-8778, I've removed the
--exclude-cli-output
and I'm still getting the same output where it doesn't render any cost change visible.
w
I suspect it’s due to the resources being shown in the plan JSON… did you try adding one of these example TF codes? does the TF plan command show those resources being added too?
b
Example code works fine if I run
infracost breakdown
locally but not via atlantis/PR in bitbucket
w
if I understand it correctly, you generated a TF plan JSON file in Atlantis using the example TF code and it didn’t output the cost estimate in the PR?