-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
236 lines (196 loc) · 6.46 KB
/
variables.tf
File metadata and controls
236 lines (196 loc) · 6.46 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
variable "aws_region" {
description = "AWS region for private ECR, Lambda, SNS, and SQS resources."
type = string
}
variable "schedule_expression" {
description = "EventBridge schedule expression."
type = string
}
variable "topic_name" {
description = "SNS topic name for scheduled results."
type = string
}
variable "fifo_topic" {
description = "Whether to create the SNS topic as FIFO."
type = bool
default = true
}
variable "content_based_deduplication" {
description = "Whether FIFO SNS content-based deduplication is enabled."
type = bool
default = true
}
variable "lambda_env" {
description = "Environment variables for the scheduled Lambda."
type = map(string)
default = {}
}
variable "lambda_timeout" {
description = "Scheduled Lambda timeout in seconds."
type = number
default = 300
}
variable "lambda_memory_size" {
description = "Scheduled Lambda memory size in MB."
type = number
default = 256
}
variable "lambda_name" {
description = "Optional name for the scheduled Lambda."
type = string
default = null
}
variable "lambda_image_command" {
description = "Optional override for the scheduled Lambda image command."
type = list(string)
default = null
}
variable "create_test_url" {
description = "Whether to create a Lambda Function URL for manual test invokes."
type = bool
default = false
}
variable "lambda_public_repo_url" {
description = "Public ECR repository URL for the scheduled Lambda image."
type = string
}
variable "lambda_public_tag" {
description = "Tag for the public scheduled Lambda image."
type = string
}
variable "lambda_private_repository_name" {
description = "Optional name for the private ECR repository that stores the republished scheduled Lambda image."
type = string
}
variable "lambda_enable_kms_encryption" {
description = "Enable KMS encryption on the private scheduled Lambda ECR repository."
type = bool
default = false
}
variable "lambda_kms_key_arn" {
description = "KMS key ARN to use when lambda_enable_kms_encryption is true."
type = string
default = null
}
variable "notification_public_repo_url" {
description = "Public ECR repository URL for the shared notification image."
type = string
default = "public.ecr.aws/i9p4w7k9/lambdacron-notifications"
}
variable "notification_public_tag" {
description = "Tag for the shared notification image."
type = string
default = "latest"
}
variable "notification_image_uri_override" {
description = "Optional full image URI for notification Lambdas. When set, notification image republish is skipped."
type = string
default = null
validation {
condition = try(length(trimspace(var.notification_image_uri_override)) > 0, var.notification_image_uri_override == null)
error_message = "notification_image_uri_override must be null or a non-empty image URI."
}
}
variable "notification_private_repository_name" {
description = "Optional name for the private ECR repository that stores the republished notification image."
type = string
default = "lambdacron-notification-local"
}
variable "notification_enable_kms_encryption" {
description = "Enable KMS encryption on the private notification ECR repository."
type = bool
default = false
}
variable "notification_kms_key_arn" {
description = "KMS key ARN to use when notification_enable_kms_encryption is true."
type = string
default = null
}
variable "email_result_types" {
description = "Result types to subscribe to for email notifications."
type = list(string)
default = ["EXAMPLE"]
}
variable "email_fifo_queue_name" {
description = "Name for the FIFO SQS queue feeding the email notifier. Must end with .fifo."
type = string
default = "lambdacron-email.fifo"
validation {
condition = endswith(var.email_fifo_queue_name, ".fifo")
error_message = "email_fifo_queue_name must end with .fifo to be a valid FIFO SQS queue name."
}
}
variable "email_subject_template_file" {
description = "Optional path to the email subject template file."
type = string
default = ""
}
variable "email_text_template_file" {
description = "Optional path to the email plaintext template file."
type = string
default = ""
}
variable "email_html_template_file" {
description = "Optional path to the email HTML template file."
type = string
default = ""
}
variable "email_sender" {
description = "Sender email address for SES. Required when email_recipients is non-empty."
type = string
default = ""
}
variable "email_recipients" {
description = "Recipient email addresses for SES. Leave empty to skip email notification deployment."
type = list(string)
default = []
}
variable "email_reply_to" {
description = "Optional reply-to email addresses for SES."
type = list(string)
default = []
}
variable "email_lambda_name" {
description = "Optional name for the email notification Lambda."
type = string
default = null
}
variable "email_timeout" {
description = "Email notifier Lambda timeout in seconds."
type = number
default = 30
}
variable "email_memory_size" {
description = "Email notifier Lambda memory size in MB."
type = number
default = 256
}
variable "email_batch_size" {
description = "Maximum number of records per email notifier Lambda invocation."
type = number
default = 10
}
variable "email_enabled" {
description = "Enable the email notification event source mapping."
type = bool
default = true
}
variable "scheduled_lambda_additional_policy_json" {
description = "Optional IAM policy JSON to attach to the scheduled Lambda role."
type = string
default = null
validation {
condition = try(length(trimspace(var.scheduled_lambda_additional_policy_json)) > 0, var.scheduled_lambda_additional_policy_json == null)
error_message = "scheduled_lambda_additional_policy_json must be null or a non-empty JSON string."
}
}
variable "scheduled_lambda_additional_policy_name" {
description = "Optional IAM policy name for scheduled_lambda_additional_policy_json."
type = string
default = null
}
variable "tags" {
description = "Tags to apply to created resources."
type = map(string)
default = {}
}