-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
227 lines (194 loc) · 5.69 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
variable "project" {
description = "The project id where the VPC being provioned"
type = string
}
variable "service_account" {
description = "Service account used by this Terraform deployment"
type = string
}
variable "region" {
description = "Region where the VM is being provisioned"
type = string
default = "us-east4"
}
data "google_compute_zones" "availability_zones" {}
variable "zone" {
description = "Zone where the VM is being provisioned"
type = string
default = "us-east4-a"
}
variable "credentials" {
description = "GCP Credentials"
type = string
default = "keys/keys.json"
}
variable "env" {
description = "Environment label used by this Terraform deployment"
type = string
default = "dev"
}
variable "neo4j_version" {
description = "Neo4j version to be installed"
type = string
default = "5"
}
variable "adminPassword" {
description = "Neo4j admin password"
type = string
default = "foobar123"
}
variable "nodeCount" {
description = "Number of Neo4j nodes to be deployed"
type = number
default = 3
validation {
condition = anytrue([
var.nodeCount == 1,
var.nodeCount == 3,
var.nodeCount == 4,
var.nodeCount == 5,
var.nodeCount == 6,
var.nodeCount == 7])
error_message = "Invalid number of nodes for a cluster"
}
}
variable "installBloom" {
description = "Install Neo4j Bloom"
type = string
default = "No"
validation {
condition = var.installBloom == "No" || var.installBloom == "Yes"
error_message = "Choose Yes or No"
}
}
variable "bloomLicenseKey" {
description = "License key for the Neo4j Bloom plugin"
type = string
}
variable "gdsNodeCount" {
description = "Number of Neo4j GDS nodes to be deployed"
type = number
default = 0
}
variable "graphDataScienceLicenseKey" {
description = "GDS license to be used by this Terraform deployment"
type = string
}
variable "vpc_name" {
description = "Name of the VPC being used by this Terraform deployment"
type = string
default = "neo4j-network"
}
/*
Modify this, if you want to create a VPC spanning across multiple
regions with Subnetworks in each region.
*/
variable "auto_create_subnetworks" {
description = "If true, Terraform will automatically create subnetworks for the VPC"
type = string
default = "false"
}
variable "subnetwork_range" {
description = "CIDR range of the subnetwork used by this Terraform deployment"
type = string
default = "10.10.10.0/24"
}
variable "neo4j_access_internal_ports" {
description = "Internal access firewall rule ports used by this Terraform deployment"
type = list(string)
default = ["5000", "6000", "7000", "7687", "7688"]
}
variable "neo4j_access_external_ports" {
description = "External access firewall rule ports used by this Terraform deployment"
type = list(string)
default = ["22", "7474", "7687"]
}
variable "vm_name" {
description = "Name of the VM being provisioned by this Terraform deployment"
type = string
default = "neo4j-node"
}
variable "machine_type" {
description = "Machine type of the VM being provisioned by this Terraform deployment"
type = string
default = "n1-standard-4"
}
variable "gds_machine_type" {
description = "Machine type of the VM being provisioned by this Terraform deployment"
type = string
default = "m1-ultramem-40"
}
variable "vm_os_image" {
description = "OS image used by this Terraform deployment"
type = string
default = "ubuntu-os-pro-cloud/ubuntu-pro-1804-lts"
# default = "projects/neo4j-aura-gcp/global/images/neo4j-enterprise-edition-byol-v20230202"
}
variable "neo4j_disk_size" {
description = "Size of the storage disk used by this Terraform deployment"
type = number
default = 100
}
variable "neo4j_disk_type" {
description = "Type of the storage disk used by this Terraform deployment (pd-ssd, pd-balanced, pd-standard)"
type = string
default = "pd-ssd"
}
/*
Setting the value to `false` prevents the boot disk from being
deleted during server upsizing or downsizing.
Setting the value to `true` deletes the boot disk and recommended
when destroying this deployment.
*/
variable "vm_boot_disk_delete_on_termination" {
type = string
default = "true"
}
variable "firewall_target_tags" {
description = "Firewall rule tags used by this Terraform deployment"
type = list(string)
default = ["neo4j-access"]
}
/*
Set this to 'true' to support resizing of the host VM Compute Engine instance.
*/
variable "allow_stopping_for_update" {
type = string
default = "true"
}
/*
Keep the following settings to 'false' if you're
not using preemptible instances
*/
variable "scheduling_preemptible" {
type = string
default = "false"
}
/*
Keep the following settings to 'false' if you're
not using preemptible instances
*/
variable "scheduling_automatic_restart" {
type = string
default = "false"
}
variable "labels_group" {
description = "Group labels used by this Terraform deployment"
type = string
default = "neo4j-cluster"
}
variable "private_zone_dns" {
description = "Private DNS setup for setting up Cluster resolver"
type = string
default = "neo4j.cluster.com."
}
variable "recordset_name" {
description = "Private DNS setup recordset name"
type = string
default = "neo4j.cluster.com."
}
variable "enable_health_check" {
description = "Flag to indicate if health check is enabled. If set to true, a firewall rule allowing health check probes is also created."
type = bool
default = false
}