Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infracost integration with GitHub Actions doesn't display cost estimation in PR comments #2948

Open
Rufaidamugalli opened this issue Mar 15, 2024 · 1 comment

Comments

@Rufaidamugalli
Copy link

I recently integrated Infracost with GitHub Actions to provide cost estimations for our infrastructure changes. However, despite configuring the setup, the cost estimation results are not showing up in the pull request (PR) comments
when running this command: infracost comment github --path=infracost.json \ --repo=$GITHUB_REPOSITORY \ --pull-request=$PR_NUMBER # or --commit=$GITHUB_SHA \ --github-token=$GITHUB_TOKEN \ --behavior=update
I expect the cost estimation result to be displayed in the PR comment.But what I see only (see screenshot):
Screenshot 2024-03-15 at 14 48 43
Note : I can run the command locally and see the cost estimation :

Screenshot 2024-03-15 at 14 55 11

@vdmgolub
Copy link
Contributor

@Rufaidamugalli Hello! Thank you for creating the issue!

Did you follow our example? If yes, then everything should be set up to show the cost diff (infracost diff command that compares PR's changes with baseline).

However, from your screenshot, it seems that you have usage-based resources like S3: such resources have no monthly costs until you add usage parameters (See the messages "Monthly cost depends on usage"). So, if this is the case, the cost of such resources will be zero thus the sentence that the monthly cost will not change.

Could you please try adding an infracost-usage.yml file as a text using these profiles and see if it makes a difference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants