forked from cloudposse/terraform-aws-sns-topic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
77 lines (67 loc) · 2.77 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
variable "namespace" {
type = string
description = "Namespace (e.g. `cp` or `cloudposse`)"
}
variable "stage" {
type = string
description = "Stage (e.g. `prod`, `dev`, `staging`)"
}
variable "name" {
type = string
description = "Name to distinguish this SNS topic"
default = "sns"
}
variable "attributes" {
type = list(string)
description = "Additional attributes to distinguish this SNS topic"
default = []
}
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)
}))
description = "Required configuration for subscibres to SNS topic."
default = {}
}
variable "allowed_aws_services_for_sns_published" {
type = list(string)
description = "AWS services that will have permission to publish to SNS topic. Used when no external json policy is used."
default = ["cloudwatch.amazonaws.com"]
}
variable "kms_master_key_id" {
type = string
description = "The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK"
default = null
}
variable "allowed_iam_arns_for_sns_publish" {
type = list(string)
description = "IAM role/user ARNs that will have permission to publish to SNS topic. Used when no external json policy is used."
default = []
}
variable "sns_topic_policy_json" {
type = string
description = "The fully-formed AWS policy as JSON"
default = ""
}
# Enabling sqs_dlq_enabled won't be effective.
# SNS subscription - redrive policy parameter is not yet avaialable in TF - waiting for PR https://github.com/terraform-providers/terraform-provider-aws/issues/10931
variable "sqs_dlq_enabled" {
type = bool
description = "Enable delivery of failed notifications to SQS and monitor messages in queue."
default = false
}
variable "sqs_dlq_max_message_size" {
type = number
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 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB)."
default = 262144
}
variable "sqs_dlq_message_retention_seconds" {
type = number
description = "The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days)."
default = 1209600
}