feat: Add support for quoted values in infracost_breakdown --hook-config (#269)

This commit is contained in:
Maksym Vlasov 2021-10-27 14:45:25 +03:00 committed by GitHub
commit e2604eacfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 7 deletions

View file

@ -259,10 +259,10 @@ Unlike most other hooks, this hook triggers once if there are any changed files
- id: infracost_breakdown
args:
- --args=--path=./env/dev
- --hook-config=.totalHourlyCost|tonumber > 0.1
- --hook-config=.totalHourlyCost|tonumber > 1
- --hook-config=.projects[].diff.totalMonthlyCost|tonumber != 10000
- --hook-config=.currency == "USD"
- --hook-config='.totalHourlyCost|tonumber > 0.1'
- --hook-config='.totalHourlyCost|tonumber > 1'
- --hook-config='.projects[].diff.totalMonthlyCost|tonumber != 10000'
- --hook-config='.currency == "USD"'
```
<!-- markdownlint-disable-next-line no-inline-html -->
<details><summary>Output</summary>
@ -385,8 +385,8 @@ Example:
```yaml
- id: terraform_providers_lock
args:
- '--args=-platform=windows_amd64'
- '--args=-platform=darwin_amd64'
- --args=-platform=windows_amd64
- --args=-platform=darwin_amd64
```
4. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc.). To solve this problem, you can find and delete all `.terraform` directories in your repository: