forked from kzzzr/dbtvault_greenplum_demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
81 lines (70 loc) · 1.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
terraform {
required_providers {
yandex = {
source = "yandex-cloud/yandex"
}
}
required_version = ">= 0.13"
}
provider "yandex" {
}
resource "yandex_mdb_greenplum_cluster" "greenplum_cluster" {
name = "greenplum"
description = "Greenplum + dbtVault"
environment = "PRESTABLE"
network_id = yandex_vpc_network.default_network.id
zone = yandex_vpc_subnet.default_subnet.zone
subnet_id = yandex_vpc_subnet.default_subnet.id
assign_public_ip = true
version = "6.22"
master_host_count = 1
segment_host_count = 2
segment_in_host = 1
user_name = "greenplum"
user_password = var.greenplum_password
security_group_ids = [yandex_vpc_security_group.test-sg-x.id]
master_subcluster {
resources {
resource_preset_id = "s3-c2-m8"
disk_size = 20
disk_type_id = "network-ssd"
}
}
segment_subcluster {
resources {
resource_preset_id = "s3-c2-m8"
disk_size = 30
disk_type_id = "network-ssd"
}
}
access {
web_sql = true
}
greenplum_config = {
max_connections = 395
gp_workfile_compression = "false"
}
}
resource "yandex_vpc_network" "default_network" {}
resource "yandex_vpc_subnet" "default_subnet" {
zone = "ru-central1-b"
network_id = yandex_vpc_network.default_network.id
v4_cidr_blocks = ["10.5.0.0/24"]
}
resource "yandex_vpc_security_group" "test-sg-x" {
network_id = yandex_vpc_network.default_network.id
ingress {
protocol = "ANY"
description = "Allow incoming traffic from members of the same security group"
from_port = 0
to_port = 65535
v4_cidr_blocks = ["0.0.0.0/0"]
}
egress {
protocol = "ANY"
description = "Allow outgoing traffic to members of the same security group"
from_port = 0
to_port = 65535
v4_cidr_blocks = ["0.0.0.0/0"]
}
}