generated from snowplow-devops/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
311 lines (261 loc) · 7.88 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
variable "accept_limited_use_license" {
description = "Acceptance of the SLULA terms (https://docs.snowplow.io/limited-use-license-1.0/)"
type = bool
default = false
validation {
condition = var.accept_limited_use_license
error_message = "Please accept the terms of the Snowplow Limited Use License Agreement to proceed."
}
}
variable "name" {
description = "A name which will be pre-pended to the resources created"
type = string
}
variable "app_version" {
description = "App version to use. This variable facilitates dev flow, the modules may not work with anything other than the default value."
type = string
default = "3.9.0"
}
variable "project_id" {
description = "The project ID in which the stack is being deployed"
type = string
}
variable "network_project_id" {
description = "The project ID of the shared VPC in which the stack is being deployed"
type = string
default = ""
}
variable "region" {
description = "The name of the region to deploy within"
type = string
}
variable "network" {
description = "The name of the network to deploy within"
type = string
}
variable "subnetwork" {
description = "The name of the sub-network to deploy within; if populated will override the 'network' setting"
type = string
default = ""
}
variable "machine_type" {
description = "The machine type to use"
type = string
default = "e2-small"
}
variable "target_size" {
description = "The number of servers to deploy"
default = 1
type = number
}
variable "associate_public_ip_address" {
description = "Whether to assign a public ip address to this instance; if false this instance must be behind a Cloud NAT to connect to the internet"
type = bool
default = true
}
variable "ssh_ip_allowlist" {
description = "The list of CIDR ranges to allow SSH traffic from"
type = list(any)
default = ["0.0.0.0/0"]
}
variable "ssh_block_project_keys" {
description = "Whether to block project wide SSH keys"
type = bool
default = true
}
variable "ssh_key_pairs" {
description = "The list of SSH key-pairs to add to the servers"
default = []
type = list(object({
user_name = string
public_key = string
}))
}
variable "ubuntu_20_04_source_image" {
description = "The source image to use which must be based of of Ubuntu 20.04; by default the latest community version is used"
default = ""
type = string
}
variable "labels" {
description = "The labels to append to this resource"
default = {}
type = map(string)
}
variable "gcp_logs_enabled" {
description = "Whether application logs should be reported to GCP Logging"
default = true
type = bool
}
variable "java_opts" {
description = "Custom JAVA Options"
default = "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"
type = string
}
# --- Configuration options
variable "raw_topic_name" {
description = "The name of the raw pubsub topic that enrichment will pull data from"
type = string
}
variable "good_topic_id" {
description = "The id of the good pubsub topic that enrichment will insert data into"
type = string
}
variable "bad_topic_id" {
description = "The id of the bad pubsub topic that enrichment will insert data into"
type = string
}
variable "assets_update_period" {
description = "Period after which enrich assets should be checked for updates (e.g. MaxMind DB)"
default = "7 days"
type = string
validation {
condition = can(regex("\\d+ (ns|nano|nanos|nanosecond|nanoseconds|us|micro|micros|microsecond|microseconds|ms|milli|millis|millisecond|milliseconds|s|second|seconds|m|minute|minutes|h|hour|hours|d|day|days)", var.assets_update_period))
error_message = "Invalid period formant."
}
}
# --- Enrichment options
#
# To take full advantage of Snowplows enrichments should be activated to enhance and extend the data included
# with each event passing through the pipeline. By default this module deploys the following:
#
# - campaign_attribution
# - event_fingerprint_config
# - referer_parser
# - ua_parser_config
# - yauaa_enrichment_config
#
# You can override the configuration JSON for any of these auto-enabled enrichments to turn them off or change the parameters
# along with activating any of available enrichments in our estate by passing in the appropriate configuration JSON.
#
# enrichment_yauaa_enrichment_config = <<EOF
# {
# "schema": "iglu:com.snowplowanalytics.snowplow.enrichments/yauaa_enrichment_config/jsonschema/1-0-0",
# "data": {
# "enabled": false,
# "vendor": "com.snowplowanalytics.snowplow.enrichments",
# "name": "yauaa_enrichment_config"
# }
# }
# EOF
variable "custom_tcp_egress_port_list" {
description = "For opening up TCP ports to access other destinations not served over HTTP(s) (e.g. for SQL / API enrichments)"
default = []
type = list(string)
}
# --- Iglu Resolver
variable "default_iglu_resolvers" {
description = "The default Iglu Resolvers that will be used by Enrichment to resolve and validate events"
default = [
{
name = "Iglu Central"
priority = 10
uri = "http://iglucentral.com"
api_key = ""
vendor_prefixes = []
},
{
name = "Iglu Central - Mirror 01"
priority = 20
uri = "http://mirror01.iglucentral.com"
api_key = ""
vendor_prefixes = []
}
]
type = list(object({
name = string
priority = number
uri = string
api_key = string
vendor_prefixes = list(string)
}))
}
variable "custom_iglu_resolvers" {
description = "The custom Iglu Resolvers that will be used by Enrichment to resolve and validate events"
default = []
type = list(object({
name = string
priority = number
uri = string
api_key = string
vendor_prefixes = list(string)
}))
}
# --- Enrichments which are enabled by default
variable "enrichment_campaign_attribution" {
default = ""
type = string
}
variable "enrichment_event_fingerprint_config" {
default = ""
type = string
}
variable "enrichment_referer_parser" {
default = ""
type = string
}
variable "enrichment_ua_parser_config" {
default = ""
type = string
}
variable "enrichment_yauaa_enrichment_config" {
default = ""
type = string
}
# --- Enrichments which are disabled by default
variable "enrichment_anon_ip" {
default = ""
type = string
}
variable "enrichment_api_request_enrichment_config" {
default = ""
type = string
}
variable "enrichment_cookie_extractor_config" {
default = ""
type = string
}
variable "enrichment_currency_conversion_config" {
default = ""
type = string
}
variable "enrichment_http_header_extractor_config" {
default = ""
type = string
}
# Note: Requires paid database to function
variable "enrichment_iab_spiders_and_bots_enrichment" {
default = ""
type = string
}
# Note: Requires free or paid subscription to database to function
variable "enrichment_ip_lookups" {
default = ""
type = string
}
variable "enrichment_javascript_script_config" {
default = ""
type = string
}
variable "enrichment_pii_enrichment_config" {
default = ""
type = string
}
variable "enrichment_sql_query_enrichment_config" {
default = ""
type = string
}
variable "enrichment_weather_enrichment_config" {
default = ""
type = string
}
# --- Telemetry
variable "telemetry_enabled" {
description = "Whether or not to send telemetry information back to Snowplow Analytics Ltd"
type = bool
default = true
}
variable "user_provided_id" {
description = "An optional unique identifier to identify the telemetry events emitted by this stack"
type = string
default = ""
}