-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Derek Morgan
committed
Oct 18, 2024
1 parent
3f96233
commit af35310
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package infracost | ||
|
||
deny[out] { | ||
# maxDiff defines the threshold that you require the cost estimate to be below | ||
maxDiff = 10.0 | ||
|
||
msg := sprintf( | ||
"Total monthly cost diff must be less than $%.2f (actual diff is $%.2f)", | ||
[maxDiff, to_number(input.diffTotalMonthlyCost)], | ||
) | ||
|
||
out := { | ||
# the msg you want to display in your PR comment, must be a string | ||
"msg": msg, | ||
"failed": to_number(input.diffTotalMonthlyCost) >= maxDiff | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
region = "us-east-1" | ||
instance_type = "t3.small" | ||
instance_type = "t3.large" |