Skip to content

Commit

Permalink
Make the anomaly threshold configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaei committed Jun 23, 2023
1 parent 7c9371f commit 8c1d4a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "aws_ce_anomaly_monitor" "serviceanomaly" {

resource "aws_ce_anomaly_subscription" "mainsubscription" {
name = "RealtimeAnomalySubscription"
threshold = 250
threshold = var.anomaly_threshold_in_usd
frequency = "IMMEDIATE"

monitor_arn_list = [
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ variable "account_budget_limit_in_usd" {
default = "200.0"
}

variable "anomaly_threshold_in_usd" {
description = "If there is an anomaly in cost above this limit, a message will be sent to SNS."
default = 250
}

variable "env" {
description = "A map of tags (key-value pairs) passed to resources."
type = string
Expand Down

0 comments on commit 8c1d4a8

Please sign in to comment.