-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathvariables.tf
339 lines (288 loc) · 11 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
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
#Module : LABEL
#Description : Terraform label module variables
variable "name" {
type = string
default = ""
description = "Name (e.g. `app` or `cluster`)."
}
variable "repository" {
type = string
default = "https://github.com/clouddrove/terraform-aws-sns"
description = "Terraform current module repo"
}
variable "environment" {
type = string
default = ""
description = "Environment (e.g. `prod`, `dev`, `staging`)."
}
variable "label_order" {
type = list(any)
default = ["name", "environment"]
description = "Label order, e.g. `name`,`application`."
}
variable "managedby" {
type = string
default = "hello@clouddrove.com"
description = "ManagedBy, eg 'CloudDrove'."
}
# Module : SNS Module
# Description : Terraform SNS module variables
variable "enabled" {
type = bool
default = true
description = "Boolean indicating whether or not to create sns module."
}
variable "platform" {
type = string
default = ""
description = "The platform that the app is registered with. See Platform for supported platforms like 'APNS' 'GCM'."
}
variable "key" {
type = string
default = ""
description = "Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources."
}
variable "gcm_key" {
type = string
default = ""
description = "Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources."
sensitive = true
}
variable "certificate" {
type = string
default = ""
description = "application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources."
}
variable "event_delivery_failure_topic_arn" {
type = string
default = ""
description = "SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure."
}
variable "event_endpoint_created_topic_arn" {
type = string
default = ""
description = "SNS Topic triggered when a new platform endpoint is added to your platform application."
}
variable "event_endpoint_deleted_topic_arn" {
type = string
default = ""
description = "SNS Topic triggered when an existing platform endpoint is deleted from your platform application."
}
variable "event_endpoint_updated_topic_arn" {
type = string
default = ""
description = "SNS Topic triggered when an existing platform endpoint is changed from your platform application."
}
variable "failure_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive failure feedback for this application."
}
variable "success_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive success feedback for this application."
sensitive = true
}
variable "success_feedback_sample_rate" {
type = number
default = 100
description = "The percentage of success to sample (0-100)."
}
variable "display_name" {
type = string
default = ""
description = "The display name for the SNS topic."
}
variable "policy" {
type = string
default = ""
description = "The fully-formed AWS policy as JSON. For more information about building AWS IAM policy documents with Terraform."
}
variable "delivery_policy" {
type = string
default = null
description = "The SNS delivery policy."
}
variable "application_success_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive success feedback for this topic."
}
variable "application_success_feedback_sample_rate" {
type = number
default = 100
description = "Percentage of success to sample."
}
variable "application_failure_feedback_role_arn" {
type = string
default = ""
description = "IAM role for failure feedback."
}
variable "http_success_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive success feedback for this topic."
sensitive = true
}
variable "http_success_feedback_sample_rate" {
type = number
default = 100
description = "Percentage of success to sample."
}
variable "http_failure_feedback_role_arn" {
type = string
default = ""
description = "IAM role for failure feedback."
}
variable "kms_master_key_id" {
type = string
default = ""
description = "The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information."
}
variable "lambda_success_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive success feedback for this topic."
}
variable "lambda_success_feedback_sample_rate" {
type = number
default = 100
description = "Percentage of success to sample."
}
variable "lambda_failure_feedback_role_arn" {
type = string
default = ""
description = "IAM role for failure feedback."
}
variable "sqs_success_feedback_role_arn" {
type = string
default = ""
description = "The IAM role permitted to receive success feedback for this topic."
}
variable "sqs_success_feedback_sample_rate" {
type = number
default = 100
description = "Percentage of success to sample."
}
variable "sqs_failure_feedback_role_arn" {
type = string
default = ""
description = "IAM role for failure feedback."
}
variable "enable_sms_preference" {
type = bool
default = false
description = "Boolean indicating whether or not to update SNS SMS Preference."
}
variable "enable_topic" {
type = bool
default = false
description = "Boolean indicating whether or not to create topic."
}
variable "enable_sns" {
type = bool
default = false
description = "Boolean indicating whether or not to create sns."
}
variable "monthly_spend_limit" {
type = number
default = 1
description = "The maximum amount in USD that you are willing to spend each month to send SMS messages."
}
variable "delivery_status_iam_role_arn" {
type = string
default = ""
description = "The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs."
sensitive = true
}
variable "delivery_status_success_sampling_rate" {
type = number
default = 50
description = "The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100."
}
variable "default_sender_id" {
type = string
default = ""
description = "A string, such as your business brand, that is displayed as the sender on the receiving device."
}
variable "default_sms_type" {
type = string
default = "Transactional"
description = "The type of SMS message that you will send by default. Possible values are: Promotional, Transactional."
}
variable "usage_report_s3_bucket" {
type = string
default = ""
description = "The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS."
}
variable "subscribers" {
type = map(object({
protocol = string
# The protocol to use. The possible values for this are: sqs, sms, lambda, application. (http or https are partially supported, see below) (email is an option but is unsupported, see below).
endpoint = string
# The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
endpoint_auto_confirms = bool
# Boolean indicating whether the end point is capable of auto confirming subscription e.g., PagerDuty (default is false)
raw_message_delivery = bool
# Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false)
filter_policy = string
# JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource.
delivery_policy = string
# The SNS delivery policy
confirmation_timeout_in_minutes = string
# Integer indicating number of minutes to wait in retying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols.
}))
description = "Required configuration for subscibres to SNS topic."
default = {}
}
variable "content_based_deduplication" {
type = bool
default = false
description = "Boolean indicating whether or not to enable content-based deduplication for FIFO topics."
}
variable "signature_version" {
type = number
default = null
description = "If SignatureVersion should be 1 (SHA1) or 2 (SHA256). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS."
}
variable "tracing_config" {
type = string
default = null
description = "Tracing mode of an Amazon SNS topic. Valid values: PassThrough, Active."
}
variable "create_topic_policy" {
type = bool
default = true
description = "Determines whether an SNS topic policy is created"
}
variable "source_topic_policy_documents" {
type = list(string)
default = []
description = "List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s"
}
variable "override_topic_policy_documents" {
type = list(string)
default = []
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`"
}
variable "enable_default_topic_policy" {
type = bool
default = true
description = "Specifies whether to enable the default topic policy. Defaults to `true`"
}
variable "topic_policy_statements" {
type = any
default = {}
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"
}
variable "fifo_topic" {
type = bool
default = false
description = "Boolean indicating whether or not to create a FIFO (first-in-first-out) topic"
}
variable "data_protection_policy" {
type = string
default = null
description = "A map of data protection policy statements"
}