bright-toddler-17549
05/24/2024, 4:50 AMcost estimate
will be added as comment in github PR.
But i'm also getting this "Governance checks" as part of my PR.
Is there any way to remove this from my PR?bright-toddler-17549
05/24/2024, 5:13 AMterraform show -json tfplan > ${file_prefix}/plan.json
echo "Running Infracost breakdown..."
infracost breakdown --path ${file_prefix}/plan.json --format json --out-file ${file_prefix}/infracost-output.json
echo "Infracost breakdown completed."
# Filter out Governance checks from JSON
jq 'del(.projects[].breakdown.governance_checks)' ${file_prefix}/infracost-output.json > ${file_prefix}/infracost-output-filtered.json
infracost comment github --repo $GIT_ORG/$GIT_REPO --path ${file_prefix}/infracost-output-filtered.json --github-token $git_token --pull-request $pr_number --behavior=new
For more clarity,
1. I'm passing json plan to Infracost cli.
2. Infracost cli performs it's actions
3. i'm trying to remove governance checks from infracost output json (not sure if governance checks is part of infracost json output)
4. Printing the infracost output in my PRwhite-airport-8778
bright-toddler-17549
05/24/2024, 6:12 AMbright-toddler-17549
05/24/2024, 6:12 AMwhite-airport-8778
bright-toddler-17549
05/24/2024, 6:15 AMGovernance checks
was not part of the PR at that time. But this time, I got API keys using my Org email .. these options are enabled by default for org email id's?white-airport-8778
bright-toddler-17549
05/24/2024, 6:18 AMinfracost auth login
It took me to infracost login page, I used my Org gmail credentials and then I got the API keywhite-airport-8778
bright-toddler-17549
05/24/2024, 6:20 AMif it's the latter, maybe they're still in the 14 day trial period, after that these settings get disabled automatically unless the upgrade.
You mean Governance checks
will get disabled but I will be able to still use my 1000 API runs for infracost calculation right?white-airport-8778
bright-toddler-17549
05/24/2024, 6:21 AMwhite-airport-8778
bright-toddler-17549
05/24/2024, 6:24 AMGovernance checks
thing and get back if any help is neededwhite-airport-8778
white-airport-8778
bright-toddler-17549
05/24/2024, 6:36 AMwhite-airport-8778
bright-toddler-17549
05/24/2024, 6:47 AMThen the results are output in the infracost.json
- that means governance checks will also be there in my output json? In that case, will I be able to remove it and print?white-airport-8778