2023-02-27 13:14:07 -08:00
/ * *
* 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 ( {
2023-03-10 07:54:09 -08:00
graceful_decommission_timeout = optional ( string )
2023-02-27 13:14:07 -08:00
cluster_config = optional ( object ( {
2023-03-10 07:54:09 -08:00
staging_bucket = optional ( string )
temp_bucket = optional ( string )
2023-02-27 13:14:07 -08:00
gce_cluster_config = optional ( object ( {
2023-03-10 07:54:09 -08:00
zone = optional ( string )
network = optional ( string )
subnetwork = optional ( string )
service_account = optional ( string )
service_account_scopes = optional ( list ( string ) )
2023-02-27 13:14:07 -08:00
tags = optional ( list ( string ) , [ ] )
2023-03-10 07:54:09 -08:00
internal_ip_only = optional ( bool )
2023-02-27 13:14:07 -08:00
metadata = optional ( map ( string ) , { } )
reservation_affinity = optional ( object ( {
consume_reservation_type = string
key = string
values = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
node_group_affinity = optional ( object ( {
node_group_uri = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
shielded_instance_config = optional ( object ( {
enable_secure_boot = bool
enable_vtpm = bool
enable_integrity_monitoring = bool
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
master_config = optional ( object ( {
num_instances = number
machine_type = string
min_cpu_platform = string
2023-06-21 15:19:48 -07:00
image_uri = string
2023-02-27 13:14:07 -08:00
disk_config = optional ( object ( {
boot_disk_type = string
boot_disk_size_gb = number
num_local_ssds = number
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
accelerators = optional ( object ( {
accelerator_type = string
accelerator_count = number
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
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
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
image_uri = string
accelerators = optional ( object ( {
accelerator_type = string
accelerator_count = number
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
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
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
software_config = optional ( object ( {
2023-03-10 07:54:09 -08:00
image_version = optional ( string )
2023-02-28 22:54:10 -08:00
override_properties = map ( string )
2023-03-10 07:54:09 -08:00
optional_components = optional ( list ( string ) )
} ) )
2023-02-27 13:14:07 -08:00
security_config = optional ( object ( {
kerberos_config = object ( {
2023-03-10 07:54:09 -08:00
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 )
2023-02-27 13:14:07 -08:00
kms_key_uri = string
2023-03-10 07:54:09 -08:00
realm = optional ( string )
2023-02-27 13:14:07 -08:00
root_principal_password_uri = string
2023-03-10 07:54:09 -08:00
tgt_lifetime_hours = optional ( string )
truststore_password_uri = optional ( string )
truststore_uri = optional ( string )
2023-02-27 13:14:07 -08:00
} )
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
autoscaling_config = optional ( object ( {
policy_uri = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
initialization_action = optional ( object ( {
script = string
2023-03-10 07:54:09 -08:00
timeout_sec = optional ( string )
} ) )
2023-02-27 13:14:07 -08:00
encryption_config = optional ( object ( {
kms_key_name = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
lifecycle_config = optional ( object ( {
2023-03-10 07:54:09 -08:00
idle_delete_ttl = optional ( string )
auto_delete_time = optional ( string )
} ) )
2023-02-27 13:14:07 -08:00
endpoint_config = optional ( object ( {
enable_http_port_access = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
dataproc_metric_config = optional ( object ( {
metrics = list ( object ( {
metric_source = string
2023-03-10 07:54:09 -08:00
metric_overrides = optional ( string )
2023-02-27 13:14:07 -08:00
} ) )
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
metastore_config = optional ( object ( {
dataproc_metastore_service = string
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
virtual_cluster_config = optional ( object ( {
2023-03-10 07:54:09 -08:00
staging_bucket = optional ( string )
2023-02-27 13:14:07 -08:00
auxiliary_services_config = optional ( object ( {
metastore_config = optional ( object ( {
dataproc_metastore_service = string
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
spark_history_server_config = optional ( object ( {
dataproc_cluster = string
2023-03-10 07:54:09 -08:00
} ) )
} ) )
2023-02-27 13:14:07 -08:00
kubernetes_cluster_config = object ( {
2023-03-10 07:54:09 -08:00
kubernetes_namespace = optional ( string )
2023-02-27 13:14:07 -08:00
kubernetes_software_config = object ( {
component_version = list ( map ( string ) )
2023-03-10 07:54:09 -08:00
properties = optional ( list ( map ( string ) ) )
2023-02-27 13:14:07 -08:00
} )
gke_cluster_config = object ( {
2023-03-10 07:54:09 -08:00
gke_cluster_target = optional ( string )
2023-02-27 13:14:07 -08:00
node_pool_target = optional ( object ( {
node_pool = string
roles = list ( string )
node_pool_config = optional ( object ( {
autoscaling = optional ( object ( {
2023-03-10 07:54:09 -08:00
min_node_count = optional ( number )
max_node_count = optional ( number )
} ) )
2023-02-27 13:14:07 -08:00
config = object ( {
2023-03-10 07:54:09 -08:00
machine_type = optional ( string )
preemptible = optional ( bool )
local_ssd_count = optional ( number )
min_cpu_platform = optional ( string )
spot = optional ( bool )
2023-02-27 13:14:07 -08:00
} )
2023-03-10 07:54:09 -08:00
locations = optional ( list ( string ) )
} ) )
} ) )
2023-02-27 13:14:07 -08:00
} )
} )
2023-03-10 07:54:09 -08:00
} ) )
2023-02-27 13:14:07 -08:00
} )
default = { }
}
2023-02-27 13:23:45 -08:00
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
}
2023-08-20 00:44:20 -07:00
variable " iam_bindings " {
description = " Authoritative IAM bindings in {ROLE => {members = [], condition = {}}}. "
type = map ( object ( {
members = list ( string )
condition = optional ( object ( {
expression = string
title = string
description = optional ( string )
} ) )
} ) )
nullable = false
default = { }
2023-02-27 13:23:45 -08:00
}
2023-08-20 00:44:20 -07:00
variable " iam_bindings_additive " {
description = " Individual additive IAM bindings. Keys are arbitrary. "
2023-08-14 02:54:50 -07:00
type = map ( object ( {
member = string
role = string
2023-08-15 07:28:23 -07:00
condition = optional ( object ( {
expression = string
title = string
description = optional ( string )
} ) )
2023-08-14 02:54:50 -07:00
} ) )
nullable = false
default = { }
}
2023-02-27 13:23:45 -08:00
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
}