-
Notifications
You must be signed in to change notification settings - Fork 5
/
variables.tf
83 lines (71 loc) · 3.53 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
# ----------------------------------------------------------------------------------------------------------------------
# REQUIRED PARAMETERS
# ----------------------------------------------------------------------------------------------------------------------
variable "name_suffix" {
description = "An arbitrary suffix that will be added to the end of the resource name(s). For example: an environment name, a business-case name, a numeric id, etc."
type = string
validation {
condition = length(var.name_suffix) <= 14
error_message = "A max of 14 character(s) are allowed."
}
}
variable "topic_name" {
description = "The topic name for this PubSub."
type = string
}
variable "push_subscriptions" {
description = "List of push subscriptions (if any) with key-value configurations. See source code for accepted keys of the configuration."
type = list(map(string))
default = []
}
variable "pull_subscriptions" {
description = "List of pull subscriptions (if any) with key-value configurations. See source code for accepted keys of the configuration."
type = list(map(string))
default = []
}
variable "bigquery_subscriptions" {
description = "List of bigquery subscriptions (if any) with key-value configurations. See source code for accepted keys of the configuration."
type = list(map(string))
default = []
}
# ----------------------------------------------------------------------------------------------------------------------
# OPTIONAL PARAMETERS
# ----------------------------------------------------------------------------------------------------------------------
variable "default_dead_letter_max_attempts" {
description = "Sets default count for maximum number of delivery attempts that a subscription may make to its dead-letter topic. Current default = 5. Maximum 100."
type = number
default = 5
validation {
condition = (var.default_dead_letter_max_attempts >= 5) && (var.default_dead_letter_max_attempts <= 100)
error_message = "Must be an integer between 5 to 100."
}
}
variable "default_ack_deadline_seconds" {
description = "Sets default value (in seconds) for maximum time before which subsribers should acknowledge a received message. Current default = 10 seconds."
type = number
default = 10
validation {
condition = (var.default_ack_deadline_seconds >= 10) && (var.default_ack_deadline_seconds <= 600)
error_message = "Must be an integer between 10 to 600."
}
}
variable "default_message_retention_duration" {
description = "Sets default value (in seconds) for how long should unacknowledged messages be retained by PubSub. Current default '604800s' = 7 days."
type = string
default = "604800s"
}
variable "default_expiry_ttl" {
description = "Sets default value (in seconds) for how long after the last activity on a subscription should that subscription be removed. Current default '604800s' = 7 days. Use \"NEVER\" for the subscription(s) to never expire by default."
type = string
default = "604800s"
}
variable "default_minimum_backoff" {
description = "Sets default value (in seconds) for minimum delay between consecutive deliveries of a given message. Current default '10 seconds'. "
type = string
default = "10s"
}
variable "default_maximum_backoff" {
description = "Sets default value (in seconds) for maximum delay between consecutive deliveries of a given message. Current default '600 seconds' = 10 minutes. "
type = string
default = "600s"
}