forked from GoogleCloudPlatform/cloud-foundation-fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
264 lines (248 loc) · 8.45 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
/**
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "dataproc_config" {
description = "Dataproc cluster config."
type = object({
graceful_decommission_timeout = optional(string)
cluster_config = optional(object({
staging_bucket = optional(string)
temp_bucket = optional(string)
gce_cluster_config = optional(object({
zone = optional(string)
network = optional(string)
subnetwork = optional(string)
service_account = optional(string)
service_account_scopes = optional(list(string))
tags = optional(list(string), [])
internal_ip_only = optional(bool)
metadata = optional(map(string), {})
reservation_affinity = optional(object({
consume_reservation_type = string
key = string
values = string
}))
node_group_affinity = optional(object({
node_group_uri = string
}))
shielded_instance_config = optional(object({
enable_secure_boot = bool
enable_vtpm = bool
enable_integrity_monitoring = bool
}))
}))
master_config = optional(object({
num_instances = number
machine_type = string
min_cpu_platform = string
image_uri = string
disk_config = optional(object({
boot_disk_type = string
boot_disk_size_gb = number
num_local_ssds = number
}))
accelerators = optional(object({
accelerator_type = string
accelerator_count = number
}))
}))
worker_config = optional(object({
num_instances = number
machine_type = string
min_cpu_platform = string
disk_config = optional(object({
boot_disk_type = string
boot_disk_size_gb = number
num_local_ssds = number
}))
image_uri = string
accelerators = optional(object({
accelerator_type = string
accelerator_count = number
}))
}))
preemptible_worker_config = optional(object({
num_instances = number
preemptibility = string
disk_config = optional(object({
boot_disk_type = string
boot_disk_size_gb = number
num_local_ssds = number
}))
}))
software_config = optional(object({
image_version = optional(string)
override_properties = map(string)
optional_components = optional(list(string))
}))
security_config = optional(object({
kerberos_config = object({
cross_realm_trust_admin_server = optional(string)
cross_realm_trust_kdc = optional(string)
cross_realm_trust_realm = optional(string)
cross_realm_trust_shared_password_uri = optional(string)
enable_kerberos = optional(string)
kdc_db_key_uri = optional(string)
key_password_uri = optional(string)
keystore_uri = optional(string)
keystore_password_uri = optional(string)
kms_key_uri = string
realm = optional(string)
root_principal_password_uri = string
tgt_lifetime_hours = optional(string)
truststore_password_uri = optional(string)
truststore_uri = optional(string)
})
}))
autoscaling_config = optional(object({
policy_uri = string
}))
initialization_action = optional(object({
script = string
timeout_sec = optional(string)
}))
encryption_config = optional(object({
kms_key_name = string
}))
lifecycle_config = optional(object({
idle_delete_ttl = optional(string)
auto_delete_time = optional(string)
}))
endpoint_config = optional(object({
enable_http_port_access = string
}))
dataproc_metric_config = optional(object({
metrics = list(object({
metric_source = string
metric_overrides = optional(string)
}))
}))
metastore_config = optional(object({
dataproc_metastore_service = string
}))
}))
virtual_cluster_config = optional(object({
staging_bucket = optional(string)
auxiliary_services_config = optional(object({
metastore_config = optional(object({
dataproc_metastore_service = string
}))
spark_history_server_config = optional(object({
dataproc_cluster = string
}))
}))
kubernetes_cluster_config = object({
kubernetes_namespace = optional(string)
kubernetes_software_config = object({
component_version = list(map(string))
properties = optional(list(map(string)))
})
gke_cluster_config = object({
gke_cluster_target = optional(string)
node_pool_target = optional(object({
node_pool = string
roles = list(string)
node_pool_config = optional(object({
autoscaling = optional(object({
min_node_count = optional(number)
max_node_count = optional(number)
}))
config = object({
machine_type = optional(string)
preemptible = optional(bool)
local_ssd_count = optional(number)
min_cpu_platform = optional(string)
spot = optional(bool)
})
locations = optional(list(string))
}))
}))
})
})
}))
})
default = {}
}
variable "group_iam" {
description = "Authoritative IAM binding for organization groups, in {GROUP_EMAIL => [ROLES]} format. Group emails need to be static. Can be used in combination with the `iam` variable."
type = map(list(string))
default = {}
nullable = false
}
variable "iam" {
description = "IAM bindings in {ROLE => [MEMBERS]} format."
type = map(list(string))
default = {}
nullable = false
}
variable "iam_bindings" {
description = "Authoritative IAM bindings in {KEY => {role = ROLE, members = [], condition = {}}}. Keys are arbitrary."
type = map(object({
members = list(string)
role = string
condition = optional(object({
expression = string
title = string
description = optional(string)
}))
}))
nullable = false
default = {}
}
variable "iam_bindings_additive" {
description = "Individual additive IAM bindings. Keys are arbitrary."
type = map(object({
member = string
role = string
condition = optional(object({
expression = string
title = string
description = optional(string)
}))
}))
nullable = false
default = {}
}
variable "labels" {
description = "The resource labels for instance to use to annotate any related underlying resources, such as Compute Engine VMs."
type = map(string)
default = {}
}
variable "name" {
description = "Cluster name."
type = string
}
variable "prefix" {
description = "Optional prefix used to generate project id and name."
type = string
default = null
validation {
condition = var.prefix != ""
error_message = "Prefix cannot be empty, please use null instead."
}
}
variable "project_id" {
description = "Project ID."
type = string
}
variable "region" {
description = "Dataproc region."
type = string
}
variable "service_account" {
description = "Service account to set on the Dataproc cluster."
type = string
default = null
}