-
Notifications
You must be signed in to change notification settings - Fork 334
/
variables.tf
176 lines (141 loc) · 4.69 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
variable "function_name" {
description = "Name of the Lambda function"
}
variable "description" {
default = ""
description = "Description of the Lambda function"
}
variable "runtime" {
default = "python3.7"
description = "Function runtime environment"
}
variable "layers" {
type = list(string)
default = []
description = "List of Lambda Layer ARNs to use with this function"
}
variable "handler" {
description = "Entry point for the function"
}
variable "memory_size_mb" {
default = 128
description = "Memory allocated to the function. CPU and network are allocated proportionally."
}
variable "timeout_sec" {
default = 30
description = "Maximum duration before execution is terminated"
}
variable "filename" {
default = "streamalert.zip"
description = "Path to .zip deployment package"
}
variable "concurrency_limit" {
default = -1
description = "Optional reserved concurrency. By default, there is no function-specific concurrency limit."
}
variable "environment_variables" {
type = map(string)
description = "Map of environment variables available to the running Lambda function"
}
variable "vpc_subnet_ids" {
type = list(string)
default = []
description = "Optional list of VPC subnet IDs"
}
variable "vpc_security_group_ids" {
type = list(string)
default = []
description = "Optional list of security group IDs (for VPC)"
}
variable "default_tags" {
type = map(string)
default = {
Name = "StreamAlert"
}
description = "The default tags to be associated with all applicable components"
}
variable "tags" {
type = map(string)
default = {}
description = "Any additional tags to be associated with all applicable components"
}
variable "auto_publish_versions" {
default = true
description = "Whether Terraform should automatically publish new versions of the function"
}
variable "alias_name" {
default = "production"
description = "An alias with this name is automatically created which points to the current version"
}
variable "schedule_expression" {
default = ""
description = "Optional rate() or cron() expression to schedule the Lambda function at regular intervals"
}
variable "lambda_input_event" {
type = map(string)
default = {}
description = "Optional dictionary representing input to be encoded to json and passed to the Lambda function"
}
variable "log_retention_days" {
default = 14
description = "CloudWatch logs for the Lambda function will be retained for this many days"
}
// ***** CloudWatch metric alarms *****
variable "alarm_actions" {
type = list(string)
default = []
description = "Optional list of CloudWatch alarm actions (e.g. SNS topic ARNs)"
}
variable "errors_alarm_enabled" {
default = true
description = "Enable CloudWatch metric alarm for invocation errors"
}
variable "errors_alarm_threshold" {
default = 0
description = "Alarm if Lambda invocation errors exceed this value in the specified period(s)"
}
variable "errors_alarm_evaluation_periods" {
default = 1
description = "Consecutive periods the errors threshold must be breached before triggering an alarm"
}
variable "errors_alarm_period_secs" {
default = 120
description = "Period over which to count the number of invocation errors"
}
variable "throttles_alarm_enabled" {
default = true
description = "Enable CloudWatch metric alarm for throttled executions"
}
variable "throttles_alarm_threshold" {
default = 0
description = "Alarm if Lambda throttles exceed this value in the specified period(s)"
}
variable "throttles_alarm_evaluation_periods" {
default = 1
description = "Consecutive periods the throttles threshold must be breached before triggering an alarm"
}
variable "throttles_alarm_period_secs" {
default = 120
description = "Period over which to count the number of throttles"
}
variable "iterator_age_alarm_enabled" {
default = false
description = "Enable IteratorAge alarm (applicable only for stream-based invocations like Kinesis)"
}
variable "iterator_age_alarm_threshold_ms" {
default = 3600000
description = "Alarm if the Lambda IteratorAge (ms) exceeds this value in the specified period(s)"
}
variable "iterator_age_alarm_evaluation_periods" {
default = 1
description = "Consecutive periods the IteratorAge threshold must be breached before triggering an alarm"
}
variable "iterator_age_alarm_period_secs" {
default = 120
description = "Period over which to evaluate the maximum IteratorAge"
}
variable "input_sns_topics" {
description = "SNS topics that are allowed to invoke this Lambda function"
type = list(string)
default = []
}