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
|
variable "log_groups" {
description = "Map of CloudWatch log groups to create"
type = map(object({
name = string
retention_in_days = optional(number, 90)
kms_key_id = optional(string, null)
skip_destroy = optional(bool, false)
}))
default = {}
}
variable "metric_filters" {
description = "Map of metric filters on log groups"
type = map(object({
log_group_key = string
pattern = string
metric_name = string
metric_namespace = string
metric_value = optional(string, "1")
default_value = optional(string, "0")
}))
default = {}
}
variable "alarms" {
description = "Map of CloudWatch metric alarms"
type = map(object({
alarm_name = string
alarm_description = optional(string, "")
namespace = string
metric_name = string
statistic = optional(string, "Sum")
period = optional(number, 300)
evaluation_periods = optional(number, 1)
threshold = number
comparison_operator = string
treat_missing_data = optional(string, "notBreaching")
dimensions = optional(map(string), {})
alarm_actions = optional(list(string), [])
ok_actions = optional(list(string), [])
datapoints_to_alarm = optional(number, null)
}))
default = {}
}
variable "composite_alarms" {
description = "Map of composite CloudWatch alarms"
type = map(object({
alarm_name = string
alarm_description = optional(string, "")
alarm_rule = string
alarm_actions = optional(list(string), [])
ok_actions = optional(list(string), [])
}))
default = {}
}
variable "dashboards" {
description = "Map of CloudWatch dashboard name to JSON body"
type = map(string)
default = {}
}
variable "tags" {
description = "Resource tags to apply to all resources"
type = map(string)
default = {}
}
|