-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
109 lines (94 loc) · 3.92 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
variable "enable_cloudwatch_alarms" {
description = "Setup CloudWatch alarms for the FSx filesystem 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 "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). Default is `null`"
type = list(string)
default = null
}
variable "filesystem_ids" {
description = "List of filesystem identifiers. Default is empty list."
type = list(string)
default = []
}
variable "ignore_states" {
description = "Suppress warnings for the listed FSx states. Default: ['CREATING', 'UPDATING']"
type = list(string)
default = [
"CREATING", "UPDATING"
]
validation {
condition = alltrue([for state in var.ignore_states : contains(["AVAILABLE", "CREATING", "MISCONFIGURED", "MISCONFIGURED_UNAVAILABLE", "UPDATING", "DELETING", "FAILED"], state)])
error_message = "value"
}
}
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 days."
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 `fsx_status_monitor`."
default = "fsx_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 empty map."
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."
}
}