-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
106 lines (90 loc) · 3.63 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
variable "rds_arns" {
description = "List of RDS instance ARNs. Default is `[]`."
type = list(string)
default = []
}
variable "alarm_actions" {
description = "The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN). Default is `null`."
type = list(string)
default = null
}
variable "insufficient_data_actions" {
description = "The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN). Default is `null`."
type = list(string)
default = null
}
variable "ok_actions" {
description = "The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN)."
type = list(string)
default = null
}
variable "enable_cloudwatch_alarms" {
description = "Setup CloudWatch alarms for the RDS state. For each state a separate alarm will be created. Default is `false`."
type = bool
default = false
}
variable "cloudwatch_alarms_treat_missing_data" {
description = "Sets how the alarms handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Default is `breaching`."
type = string
default = "breaching"
validation {
condition = can(regex("^(missing|ignore|breaching|notBreaching)$", var.cloudwatch_alarms_treat_missing_data))
error_message = "The value must be one of missing, ignore, breaching or notBreaching."
}
}
variable "ignore_states" {
description = "Suppress warnings for the listed RDS states. Default: ['MAINTENANCE']"
type = list(string)
default = [
"MAINTENANCE"
]
}
variable "lambda_insights_layers_arn" {
description = "The ARN of the Lambda Insights layer. Default is `null`."
type = string
default = null
}
variable "log_retion_period_in_days" {
type = number
default = 365
description = "Number of days logs will be retained. Default is `365`."
validation {
condition = contains([1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365,
400, 545, 731, 1096, 1827, 2192, 2557, 2992, 3288, 3653], var.log_retion_period_in_days)
error_message = "log_retion_period_in_days must be one of the allowed values: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, 3653"
}
}
variable "name" {
type = string
description = "Name of the health monitor. Default is `rds_status_monitor`."
default = "rds_status_monitor"
}
variable "memory_size" {
type = number
description = "Amount of memory in MByte that the Lambda function can use at runtime. Default is `160`."
default = 160
validation {
condition = var.memory_size >= 128 && var.memory_size <= 10240
error_message = "memory_size must be between 128 and 10240"
}
}
variable "schedule_expression" {
description = "The schedule expression for the CloudWatch event rule. Default is `rate(5 minutes)`."
type = string
default = "rate(5 minutes)"
}
variable "tags" {
description = "A map of tags to add to all resources. Default is `{}`."
type = map(string)
default = {
}
}
variable "timeout" {
type = number
description = "The amount of time that Lambda allows a function to run before stopping it. Default is 30 seconds."
default = 30
validation {
condition = var.timeout >= 10 && var.timeout <= 900
error_message = "Timeout must be between 10 and 900."
}
}