Infrastructure Cost Estimation (infra/infracost)
Calculates Terraform / Terragrunt cost estimates using Infracost and posts cost breakdowns to job summaries or PR comments.
🛠️ Usage
- name: infracost | breakdown
uses: jambazid/gha-actions/infra/infracost@main
with:
path: infra/terraform
currency: USD
infracost-api-key: ${{ secrets.INFRACOST_API_KEY }}
| Input |
Description |
Required |
Default |
path |
Path to Terraform or Terragrunt directory. |
true |
— |
currency |
Currency code for cost estimates (e.g. USD, GBP). |
false |
USD |
infracost-api-key |
Infracost API key for pricing lookup. |
true |
— |
📤 Outputs
| Output |
Description |
total-monthly-cost |
Estimated monthly cost calculated by Infracost. |
past-total-monthly-cost |
Previous monthly cost baseline. |
diff-total-monthly-cost |
Cost difference between baseline and proposed changes. |