forked from terraform-aws-modules/terraform-aws-sqs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
319 lines (274 loc) · 10.6 KB
/
Copy pathvariables.tf
File metadata and controls
319 lines (274 loc) · 10.6 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
variable "create" {
description = "Whether to create SQS queue"
type = bool
default = true
}
variable "region" {
description = "Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration"
type = string
default = null
}
variable "tags" {
description = "A mapping of tags to assign to all resources"
type = map(string)
default = {}
}
################################################################################
# Queue
################################################################################
variable "content_based_deduplication" {
description = "Enables content-based deduplication for FIFO queues"
type = bool
default = null
}
variable "deduplication_scope" {
description = "Specifies whether message deduplication occurs at the message group or queue level"
type = string
default = null
}
variable "delay_seconds" {
description = "The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes)"
type = number
default = null
}
variable "fifo_queue" {
description = "Boolean designating a FIFO queue"
type = bool
default = false
}
variable "fifo_throughput_limit" {
description = "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group"
type = string
default = null
}
variable "kms_data_key_reuse_period_seconds" {
description = "The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours)"
type = number
default = null
}
variable "kms_master_key_id" {
description = "The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK"
type = string
default = null
}
variable "max_message_size" {
description = "The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 1048576 bytes (1024 KiB). The default for this attribute is 262144 (256 KiB)"
type = number
default = null
}
variable "message_retention_seconds" {
description = "The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)"
type = number
default = null
}
variable "name" {
description = "This is the human-readable name of the queue. If omitted, Terraform will assign a random name"
type = string
default = null
}
variable "use_name_prefix" {
description = "Determines whether `name` is used as a prefix"
type = bool
default = false
}
variable "receive_wait_time_seconds" {
description = "The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)"
type = number
default = null
}
variable "redrive_allow_policy" {
description = "The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs"
type = any
default = {}
}
variable "redrive_policy" {
description = "The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string (\"5\")"
type = any
default = {}
}
variable "sqs_managed_sse_enabled" {
description = "Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys"
type = bool
default = true
}
variable "visibility_timeout_seconds" {
description = "The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)"
type = number
default = null
}
################################################################################
# Queue Policy
################################################################################
variable "create_queue_policy" {
description = "Whether to create SQS queue policy"
type = bool
default = false
}
variable "source_queue_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s"
type = list(string)
default = []
}
variable "override_queue_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`"
type = list(string)
default = []
}
variable "queue_policy_statements" {
description = "A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage"
type = map(object({
sid = optional(string)
actions = optional(list(string))
not_actions = optional(list(string))
effect = optional(string, "Allow")
resources = optional(list(string))
not_resources = optional(list(string))
principals = optional(list(object({
type = string
identifiers = list(string)
})))
not_principals = optional(list(object({
type = string
identifiers = list(string)
})))
condition = optional(list(object({
test = string
variable = string
values = list(string)
})))
# TODO - remove at next breaking change
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
}))
default = null
}
################################################################################
# Dead Letter Queue
################################################################################
variable "create_dlq" {
description = "Determines whether to create SQS dead letter queue"
type = bool
default = false
}
variable "dlq_content_based_deduplication" {
description = "Enables content-based deduplication for FIFO queues"
type = bool
default = null
}
variable "dlq_deduplication_scope" {
description = "Specifies whether message deduplication occurs at the message group or queue level"
type = string
default = null
}
variable "dlq_delay_seconds" {
description = "The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes)"
type = number
default = null
}
variable "dlq_kms_data_key_reuse_period_seconds" {
description = "The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours)"
type = number
default = null
}
variable "dlq_kms_master_key_id" {
description = "The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK"
type = string
default = null
}
variable "dlq_message_retention_seconds" {
description = "The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)"
type = number
default = null
}
variable "dlq_name" {
description = "This is the human-readable name of the queue. If omitted, Terraform will assign a random name"
type = string
default = null
}
variable "dlq_receive_wait_time_seconds" {
description = "The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds)"
type = number
default = null
}
variable "create_dlq_redrive_allow_policy" {
description = "Determines whether to create a redrive allow policy for the dead letter queue"
type = bool
default = true
}
variable "dlq_redrive_allow_policy" {
description = "The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs"
type = any
default = {}
}
variable "dlq_sqs_managed_sse_enabled" {
description = "Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys"
type = bool
default = true
}
variable "dlq_fifo_throughput_limit" {
description = "Specifies whether the Dead Letter Queue FIFO queue throughput quota applies to the entire queue or per message group"
type = string
default = null
}
variable "dlq_visibility_timeout_seconds" {
description = "The visibility timeout for the queue. An integer from 0 to 43200 (12 hours)"
type = number
default = null
}
variable "dlq_tags" {
description = "A mapping of additional tags to assign to the dead letter queue"
type = map(string)
default = {}
}
################################################################################
# Dead Letter Queue Policy
################################################################################
variable "create_dlq_queue_policy" {
description = "Whether to create SQS queue policy"
type = bool
default = false
}
variable "source_dlq_queue_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s"
type = list(string)
default = []
}
variable "override_dlq_queue_policy_documents" {
description = "List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`"
type = list(string)
default = []
}
variable "dlq_queue_policy_statements" {
description = "A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage"
type = map(object({
sid = optional(string)
actions = optional(list(string))
not_actions = optional(list(string))
effect = optional(string, "Allow")
resources = optional(list(string))
not_resources = optional(list(string))
principals = optional(list(object({
type = string
identifiers = list(string)
})))
not_principals = optional(list(object({
type = string
identifiers = list(string)
})))
condition = optional(list(object({
test = string
variable = string
values = list(string)
})))
# TODO - remove at next breaking change
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
}))
default = null
}