-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
56 lines (49 loc) · 1.71 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
resource "aiven_cassandra" "this" {
count = var.create ? 1 : 0
cloud_name = var.cloud_name
maintenance_window_dow = var.maintenance_window_dow
maintenance_window_time = var.maintenance_window_time
plan = var.plan
project = var.project
project_vpc_id = var.project_vpc_id
static_ips = var.static_ips
service_name = var.service_name
termination_protection = var.termination_protection
cassandra_user_config {
cassandra_version = var.cassandra_version
migrate_sstableloader = var.migrate_sstableloader
project_to_fork_from = var.project_to_fork_from
service_to_fork_from = var.service_to_fork_from
dynamic "ip_filter_object" {
for_each = var.ip_filter_object
content {
network = lookup(ip_filter_object.value, "network")
description = lookup(ip_filter_object.value, "description", null)
}
}
cassandra {
batch_size_fail_threshold_in_kb = var.batch_size_fail_threshold_in_kb
batch_size_warn_threshold_in_kb = var.batch_size_warn_threshold_in_kb
}
public_access {
prometheus = var.public_access_prometheus
}
private_access {
prometheus = var.private_access_prometheus
}
}
dynamic "service_integrations" {
for_each = var.service_integrations
content {
integration_type = lookup(service_integrations.value, "integration_type", null)
source_service_name = lookup(service_integrations.value, "source_service_name", null)
}
}
dynamic "tag" {
for_each = var.tags
content {
key = lookup(tag.value, "key", null)
value = lookup(tag.value, "value", null)
}
}
}