generated from terraform-yacloud-modules/terraform-yandex-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
58 lines (53 loc) · 2.17 KB
/
main.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
resource "yandex_dataproc_cluster" "dataproc_cluster" {
description = var.description
name = var.name
labels = var.labels
service_account_id = var.service_account_id
zone_id = var.zone_id
ui_proxy = var.ui_proxy
security_group_ids = var.security_group_ids
deletion_protection = var.deletion_protection
cluster_config {
version_id = var.cluster_version
hadoop {
services = var.hadoop_services
properties = var.hadoop_properties
ssh_public_keys = var.ssh_public_keys
dynamic "initialization_action" {
for_each = var.initialization_actions
content {
uri = initialization_action.value.uri
args = initialization_action.value.args
timeout = initialization_action.value.timeout
}
}
}
dynamic "subcluster_spec" {
for_each = var.subcluster_specs
content {
name = subcluster_spec.value.name
role = subcluster_spec.value.role
resources {
resource_preset_id = subcluster_spec.value.resources.resource_preset_id
disk_type_id = subcluster_spec.value.resources.disk_type_id
disk_size = subcluster_spec.value.resources.disk_size
}
subnet_id = subcluster_spec.value.subnet_id
hosts_count = subcluster_spec.value.hosts_count
assign_public_ip = subcluster_spec.value.assign_public_ip
dynamic "autoscaling_config" {
for_each = subcluster_spec.value.autoscaling_config
content {
max_hosts_count = autoscaling_config.value.max_hosts_count
preemptible = autoscaling_config.value.preemptible
warmup_duration = autoscaling_config.value.warmup_duration
stabilization_duration = autoscaling_config.value.stabilization_duration
measurement_duration = autoscaling_config.value.measurement_duration
cpu_utilization_target = autoscaling_config.value.cpu_utilization_target
decommission_timeout = autoscaling_config.value.decommission_timeout
}
}
}
}
}
}