-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
144 lines (122 loc) · 4.31 KB
/
variables.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
variable "overall_budget_cost_alert_enabled" {
description = "Enable/Disable the overall budget cost alert."
type = bool
default = false
}
variable "service_budget_cost_alert_enabled" {
description = "Enable/Disable a specific service budget cost alert."
type = bool
default = false
}
variable "budget_limit_amount" {
description = "The amount for the budget alert."
type = string
default = "100"
}
variable "budget_limit_unit" {
description = "The currency used for the budget, such as USD or GB."
type = string
default = "USD"
}
variable "budget_time_unit" {
description = "The length of time until a budget resets the actual and forecasted spend, Valid values: MONTHLY, QUARTERLY, ANNUALLY."
type = string
default = "MONTHLY"
}
variable "budget_service_filter" {
description = "An AWS Service filter to use when creating a specific service budget alert."
type = string
default = "Amazon Elastic Compute Cloud - Compute"
validation {
condition = (
can(regex("^Amazon Elastic Compute Cloud - Compute", var.budget_service_filter)) ||
can(regex("^Amazon Redshift", var.budget_service_filter)) ||
can(regex("^Amazon Relational Database Service", var.budget_service_filter)) ||
can(regex("^Amazon ElastiCache", var.budget_service_filter)) ||
can(regex("^Amazon Elasticsearch Service", var.budget_service_filter))
)
error_message = "The Servive Filter must be one of the allowed CostFilters `Amazon Elastic Compute Cloud - Compute | Amazon Redshift | Amazon Relational Database Service | Amazon ElastiCache | Amazon Elasticsearch Service`."
}
}
# this is not a valid input, this map object is created to generate a shortname for the budget alert rather
# than using the long name for the service.
variable "service_types" {
type = map(string)
default = {
"Amazon Elastic Compute Cloud - Compute" = "ec2"
"Amazon Redshift" = "redshift"
"Amazon Relational Database Service" = "rds"
"Amazon ElastiCache" = "elasticache"
"Amazon Elasticsearch Service" = "elasticsearch"
}
}
variable "notification_threshold" {
description = "Threshold when the notification should be sent"
type = string
default = 100
}
variable "notification_type" {
description = "What kind of budget value to notify on. Can be ACTUAL or FORECASTED"
type = string
default = "FORECASTED"
}
variable "notification_emails" {
description = "List of email addresses to send budget notifications too"
type = string
default = ""
}
variable "cost_type_include_credit" {
description = "A boolean value whether to include credits in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_discount" {
description = "Specifies whether a budget includes discounts."
type = string
default = "true"
}
variable "cost_type_include_other_subscription" {
description = "A boolean value whether to include other subscription costs in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_recurring" {
description = "A boolean value whether to include recurring costs in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_refund" {
description = "A boolean value whether to include refunds in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_subscription" {
description = "A boolean value whether to include subscriptions in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_support" {
description = "A boolean value whether to include support costs in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_tax" {
description = "A boolean value whether to include support costs in the cost budget."
type = string
default = "true"
}
variable "cost_type_include_upfront" {
description = "A boolean value whether to include support costs in the cost budget."
type = string
default = "true"
}
variable "cost_type_use_amortized" {
description = "Specifies whether a budget uses the amortized rate."
type = string
default = "false"
}
variable "cost_type_use_blended" {
description = "A boolean value whether to use blended costs in the cost budget."
type = string
default = "false"
}