set budget threshold percentages to be a variable
b3976096
Hari Sekhon
committed
2 changed files
budget.tf
/aws_budgets/budget.tf-2+2
/aws_budgets/budget.tf
Add comment 25
Add comment 26 notification {
Add comment 27 comparison_operator = "GREATER_THAN"
Add comment 28 Minus   threshold = 80
Add comment 28 Plus   threshold = var.threshold_percent # eg 80%
Add comment 29 threshold_type = "PERCENTAGE"
Add comment 30 notification_type = "FORECASTED"
Add comment 31 subscriber_sns_topic_arns = [data.aws_sns_topic.aws-charges.arn]
Add comment 33 }
Add comment 34 notification {
Add comment 35 comparison_operator = "GREATER_THAN"
Add comment 36 Minus   threshold = 80
Add comment 36 Plus   threshold = var.threshold_percent
Add comment 37 threshold_type = "PERCENTAGE"
Add comment 38 notification_type = "ACTUAL"
Add comment 39 subscriber_sns_topic_arns = [data.aws_sns_topic.aws-charges.arn]
variables.tf
/aws_budgets/variables.tf+4
/aws_budgets/variables.tf
Add comment 10 variable "region" {
Add comment 11 type = string
Add comment 12 }
Add comment 13 Plus  variable "threshold_percent" {
Add comment 14 Plus   type = number
Add comment 15 Plus   default = 80
Add comment 16 Plus  }
Add comment 13 17