-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbudget.tf
86 lines (77 loc) · 2.73 KB
/
budget.tf
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
resource "aws_budgets_budget" "main" {
count = local.is_prod_envs
name = "filecoin-dev_costs_budget"
budget_type = "COST"
limit_amount = "24500"
limit_unit = "USD"
time_period_start = "2022-06-01_00:00"
time_period_end = "2032-06-30_23:59"
time_unit = "MONTHLY"
cost_types {
include_credit = true
include_discount = true
include_other_subscription = true
include_recurring = true
include_refund = true
include_subscription = true
include_support = true
include_tax = true
include_upfront = true
use_amortized = true
use_blended = false
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 50
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["[email protected]"]
subscriber_sns_topic_arns = [aws_sns_topic.budgets_alarm_topic[0].arn]
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 90
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["[email protected]"]
subscriber_sns_topic_arns = [aws_sns_topic.budgets_alarm_topic[0].arn]
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 95
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["[email protected]"]
subscriber_sns_topic_arns = [aws_sns_topic.budgets_alarm_topic[0].arn]
}
}
resource "aws_budgets_budget" "daily_budget" {
count = local.is_prod_envs
name = "daily-budget"
budget_type = "COST"
limit_amount = "1000"
limit_unit = "USD"
time_period_end = "2032-07-05_00:00"
time_period_start = "2023-07-05_00:00"
time_unit = "DAILY"
cost_types {
include_credit = true
include_discount = true
include_other_subscription = true
include_recurring = true
include_refund = true
include_subscription = true
include_support = true
include_tax = true
include_upfront = true
use_amortized = false
use_blended = false
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 100
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_sns_topic_arns = [aws_sns_topic.budgets_alarm_topic[0].arn]
}
}