subhamay-bhattacharyya-gha/Infracost Run
Downloads a Terraform plan artifact and runs Infracost to generate a cost breakdown.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| terraform-dir | Relative path to the directory containing Terraform configuration files (e.g., 'tf', 'infrastructure'). | no | tf |
| release-tag | Git release tag to check out. If omitted, the latest commit on the default branch is used. | no | "" |
| ci-pipeline | Set to 'true' to include the commit SHA in the Terraform state key (suitable for CI/CD). Use 'false' for static state keys. | no | false |
| s3-bucket | Name of the S3 bucket used as the backend for storing the Terraform state file. | yes | — |
| s3-region | AWS region where the S3 backend bucket is located (e.g., us-east-1, eu-west-1). | yes | — |
| tf-plan-name | Name of the Terraform plan artifact. | no | terraform-plan |
| tf-plan-file | Base filename (without extension) for the Terraform plan output. | no | tfplan |
| tf-vars-file | Optional Terraform variable file. | no | terraform.tfvars |
| infracost-api-key | Infracost API key. | yes | — |
| gist-id | Gist ID containing the Infracost configuration (e.g., max cost). | yes | — |
| gist-filename | Filename of the Gist containing the Infracost configuration (e.g., 'infracost-config.json'). | yes | infracost-config.json |
| environment | GitHub environment name (e.g., 'prod', 'test', 'devl'). Used to match max cost in Gist. | no | devl |
Outputs
| name | description |
|---|---|
| monthly-cost | Total monthly cost from Infracost |
| max-cost | Maximum cost threshold from Gist or fallback |