forked from infracost/infracost-gh-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
46 lines (45 loc) · 2.31 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Infracost
description: Show cloud cost estimate changes for Terraform in pull requests.
author: infracost
branding:
icon: trending-up
color: yellow
inputs:
path:
description: Path to the Terraform directory or JSON/plan file. Either `path` or `config_file` is required.
required: false
terraform_plan_flags:
description: Flags to pass to the 'terraform plan' command, e.g. `"-var-file=my.tfvars -var-file=other.tfvars"`. Applicable when path is a Terraform directory.
required: false
terraform_workspace:
description: The Terraform workspace to use. Applicable when path is a Terraform directory. Only set this for multi-workspace deployments, otherwise it might result in the Terraform error "workspaces not supported".
required: false
usage_file:
description: Path to Infracost usage file (https://www.infracost.io/docs/usage_based_resources) that specifies values for usage-based resources, see https://github.com/infracost/infracost/blob/master/infracost-usage-example.yml for the available options.
required: false
config_file:
description: If your repo has multiple Terraform projects or workspaces, define them in a config file (https://www.infracost.io/docs/config_file/) and set this input to its path. Their results will be combined into the same diff output. Cannot be used with path, terraform_plan_flags or usage_file inputs.
required: false
percentage_threshold:
description: The absolute percentage threshold that triggers a pull request comment with the diff. Defaults to 0, meaning that a comment is posted if the cost estimate changes. For example, set to 5 to post a comment if the cost estimate changes by more than plus or minus 5%.
required: false
default: 0
post_condition:
description: Hello
required: true
outputs:
total_monthly_cost:
description: The new total monthly cost estimate.
past_total_monthly_cost:
description: The past total monthly cost estimate.
runs:
using: docker
image: docker://257117/infracost:test # Use a specific version instead of latest if locking is preferred
args:
- ${{ inputs.path }}
- ${{ inputs.terraform_plan_flags }}
- ${{ inputs.terraform_workspace }}
- ${{ inputs.usage_file }}
- ${{ inputs.config_file }}
- ${{ inputs.percentage_threshold }}
- ${{ inputs.post_condition }}