-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
275 lines (232 loc) · 6.65 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
#
# IAM
#
variable "additional_admin_users" {
default = []
type = list(string)
description = "list of additional entities to give admin permissions to provisioned resources"
}
variable "additional_read_users" {
default = []
type = list(string)
description = "list of additional entities to give read only permissions to provisioned resources"
}
variable "tamr_instance_service_account" {
type = string
description = "email of service account to attach to the tamr instance. If not given will create a new service account for tamr to use."
}
#
# Tamr VM
#
variable "tamr_instance_image" {
type = string
description = "Image to use for Tamr VM boot disk"
}
variable "tamr_zip_uri" {
type = string
description = "gcs location to download tamr zip from"
}
variable "tamr_instance_tags" {
default = []
type = list(string)
description = "list of network tags to attach to instance"
}
variable "tamr_instance_metadata" {
default = {}
type = map(string)
description = "custom metadata to attach to created VM"
}
variable "pre_install_bash" {
default = ""
type = string
description = <<EOF
Bash to be run before Tamr is installed.
Likely to be used to meet Tamr's prerequisites, if not already met by the image. (https://docs.tamr.com/new/docs/requirements )
This will only be run once before Tamr is installed, unless Tamr fails to install. This bash will also be run on subsequent attempts to install Tamr, so it is recommended that this bash is idempotent.
EOF
}
# TODO: vm settings
#
# GCP LB
#
# TODO:
#
# SQL
#
variable "sql_tier" {
type = string
description = "the machine type to use for the sql instance"
default = "db-custom-2-4096"
}
variable "sql_disk_size" {
type = number
description = "size of the disk to use on the tamr sql instance"
default = 10
}
variable "sql_disk_type" {
type = string
description = "The disk type to use on the cloud SQL instance. should be either PD_SSD or PD_STANDARD"
default = "PD_SSD"
}
variable "enable_cloud_sql_private_ip" {
type = bool
description = "Whether the Cloud SQL instance should use a public or private ip address"
default = false
}
variable "private_network_id" {
type = string
description = "The VPC network from which the Cloud SQL instance is accessible for private IP"
default = ""
}
variable "require_ssl" {
type = bool
description = "Set if SSL is required for the Cloud SQL instance."
default = false
}
variable "ssl_mode" {
type = string
description = "Set up the SSL mode. If SSL is required, this value is TRUSTED_CLIENT_CERTIFICATE_REQUIRED."
default = "ALLOW_UNENCRYPTED_AND_ENCRYPTED"
}
variable "tamr_cloud_sql_sslmode" {
type = string
default = "disable"
description = "if ssl is disabled or not.Possible values include disable , allow , prefer , require , verify-ca and verify-full"
}
#
# Bigtable
#
variable "tamr_bigtable_min_nodes" {
type = number
description = "Min number of nodes to scale down to"
default = 1
}
variable "tamr_bigtable_max_nodes" {
type = number
description = "Max number of nodes to scale up to"
}
#
# Dataproc
#
variable "dataproc_network_tags" {
default = []
type = list(string)
description = "list of network tags to attach to each dataproc node"
}
variable "dataproc_cluster_master_instance_type" {
default = "n1-highmem-4"
type = string
description = "Instance type to use as dataproc master"
}
variable "dataproc_cluster_master_disk_size" {
default = 1000
type = number
description = "Size of disk to use on dataproc master disk"
}
variable "dataproc_cluster_worker_machine_type" {
default = "n1-standard-16"
type = string
description = "machine type of default worker pool"
}
variable "dataproc_cluster_worker_num_instances" {
default = 4
type = number
description = "Number of default workers to use"
}
variable "dataproc_cluster_worker_num_local_ssds" {
default = 2
type = number
description = "Number of localssds to attach to each worker node"
}
variable "dataproc_image_version" {
default = "2.0"
type = string
description = "Dataproc image version"
}
#
# spark settings
#
variable "spark_driver_memory" {
default = "12G"
type = string
description = "Amount of memory spark should allocate to spark driver"
}
variable "spark_executor_memory" {
default = "13G"
type = string
description = "Amount of memory spark should allocate to each spark executor"
}
variable "spark_executor_cores" {
default = 5
type = number
description = "Amount of cores spark should allocate to each spark executor"
}
variable "spark_executor_instances" {
default = 12
type = number
description = "number of spark executor instances"
}
variable "spark_properties_override" {
default = ""
type = string
description = "json blob of spark properties to override, if not set will use a default set of properties that should work for most use cases"
}
# GCS
#
variable "bucket_locations" {
type = string
description = "Location for the gcs buckets, default is `US`"
default = "US"
}
# Misc
#
variable "project_id" {
type = string
description = "project_id for resources to be deployed into"
}
variable "region" {
type = string
description = "GCP region to deploy resources into"
}
variable "zone" {
type = string
description = "GCP zone to deploy resources into"
}
variable "deployment_name" {
type = string
description = "name to use as the base for all resources created. NOTE: if you change this it will recreate all resources"
}
variable "subnet_self_link" {
type = string
description = "subnetwork self_link to deploy resources onto"
}
variable "labels" {
default = {}
type = map(string)
description = "Labels to attach to created resources"
}
variable "force_destroy" {
default = false
type = bool
description = "force destroy potentially persistent resources, like bigtable/gcs"
}
variable "tamr_license_key" {
default = ""
type = string
description = "Set a tamr license key"
}
variable "tamr_instance_disk_type" {
default = "pd-ssd"
type = string
description = "boot disk type"
}
variable "tamr_instance_disk_size" {
default = 100
type = number
description = "size of the boot disk"
}
variable "sql_pg_version" {
default = "POSTGRES_12"
type = string
description = "version of postgres to use on CloudSQL instance"
}