forked from oracle-devrel/terraform-oci-arch-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.yaml
649 lines (585 loc) · 20.1 KB
/
schema.yaml
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
## Copyright (c) 2022 Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
title: "Create three-node deployment of a High Available PostgreSQL database on Oracle Cloud Infrastructure Compute instances."
stackDescription: "Deploy typical three-node deployment of a High Available PostgreSQL database on Oracle Cloud Infrastructure Compute instances."
schemaVersion: 1.1.0
version: "20190404"
locale: "en"
variableGroups:
- title: General Configuration
visible: false
variables:
- tenancy_ocid
- region
- release
- fingerprint
- private_key_path
- user_ocid
- title: Required Configuration
variables:
- compartment_ocid
- availability_domain_number
- postgresql_version
- postgresql_password
- postgresql_deploy_hotstandby1
- postgresql_deploy_hotstandby2
- create_in_private_subnet
- use_existing_vcn
- postgresql_vcn
- postgresql_subnet
- show_advanced
- title: Network Optional Configuration
visible:
and:
- show_advanced
variables:
- pg_whitelist_cidr
- pg_whitelisted_ip
- postgresql_vcn_cidr
- postgresql_subnet_cidr
- create_drg_for_private_subnet
- title: Compute, Storage & Backup Optional Configuration
visible:
and:
- show_advanced
variables:
- ssh_public_key
- instance_os
- linux_os_version
- add_iscsi_volume
- boot_volume_backup_policy_enabled
- boot_volume_backup_policy_level
- boot_volume_initial_backup
- iscsi_volume_size_in_gbs
- block_volume_backup_policy_enabled
- block_volume_backup_policy_level
- block_volume_initial_backup
- title: PostgreSQL Master Optional Configuration
visible:
and:
- show_advanced
variables:
- postgresql_master_fd
- postgresql_instance_shape
- postgresql_instance_flex_shape_ocpus
- postgresql_instance_flex_shape_memory
- postgresql_replicat_username
- title: PostgreSQL HotStandby1 Optional Configuration
visible:
and:
- show_advanced
- postgresql_deploy_hotstandby1
variables:
- postgresql_hotstandby1_ad
- postgresql_hotstandby1_fd
- postgresql_hotstandby1_shape
- postgresql_hotstandby1_flex_shape_ocpus
- postgresql_hotstandby1_flex_shape_memory
- title: PostgreSQL HotStandby2 Configuration
visible:
and:
- show_advanced
- postgresql_deploy_hotstandby2
variables:
- postgresql_hotstandby2_ad
- postgresql_hotstandby2_fd
- postgresql_hotstandby2_shape
- postgresql_hotstandby2_flex_shape_ocpus
- postgresql_hotstandby2_flex_shape_memory
variables:
show_advanced:
type: boolean
title: "Show advanced options?"
description: "Shows advanced options."
visible: true
default: false
pg_whitelisted_ip:
type: string
visible:
not:
- create_in_private_subnet
required: false
title: "Whitelisted IP"
description: "Choose whitelisted IP in a public scenario (for example, 89.64.91.8). It will give you the ability to access the database from your laptop and PGAdmin tool."
default: ""
pg_whitelist_cidr:
type: string
required: false
title: "Whitelisted CIDR Block"
description: "Choose whitelisted Cidr Block to be added in the firewall-cmd in trusted zone. It will give you the ability to access the database from your laptop and PGAdmin tool."
default: ""
postgresql_deploy_hotstandby1:
type: boolean
title: "Deploy first PostgreSQL HotStandby?"
description: "Check the box to deploy first PostgreSQL HotStandby."
visible: true
default: false
postgresql_deploy_hotstandby2:
type: boolean
title: "Deploy second PostgreSQL HotStandby?"
description: "Check the box to deploy second PostgreSQL HotStandby."
visible: true
default: false
compartment_ocid:
type: oci:identity:compartment:id
required: true
visible: true
title: Compartment
description: "Compartment where you want to create the solution resources"
region:
type: oci:identity:region:name
required: true
visible: true
title: Region
description: "Region where you want to deploy the resources defined by this stack."
# availability_domain_number:
# type: oci:identity:availabilitydomain:name
# required: true
# visible: true
# title: "Availability Domain for master PostgreSQL"
# description: "Availability Domain to be chosen for master PostgreSQL."
# dependsOn:
# compartmentId: ${compartment_ocid}
availability_domain_number:
type: string
required: true
visible: true
title: "Availability Domain number for Postgresql"
default: "1"
dependsOn:
compartmentId: ${compartment_ocid}
ssh_public_key:
type: oci:core:ssh:publickey
title: "Public SSH Key"
description: "Choose public SSH Key to be uploaded into compute instances."
required: false
postgresql_password:
type: password
required: true
visible: true
title: "PostgreSQL Password"
description: "The password must start with a letter, and it can contain letters (uppercase, lowercase), numbers, and the symbols _ $ #"
minLength: 12
maxLength: 30
pattern: ^[A-Za-z][A-Za-z0-9_#\$]+$
postgresql_version:
type: enum
visible: true
required: true
title: "PostgreSQL Version"
description: "Choose PostgreSQL Version."
default: "13"
enum:
- "13"
- "12"
- "11"
- "10"
- "9.6"
- "14"
create_in_private_subnet:
type: boolean
visible: true
required: true
title: "Create in Private Subnet"
description: "Providing an option to create PostgreSQL VMs in private or public subnet (for private subnet OCI Bastion Service will be provisioned)."
default: true
# Optional Configuration
add_iscsi_volume:
type: boolean
title: "Add iSCSI Volume to compute?"
description: "Check the box to add iSCSI Volume to compute instance."
visible: true
default: true
iscsi_volume_size_in_gbs:
type: number
title: "iSCSI Volume Size in GB"
description: "Choose the size of iSCSI volume attached to compute instance (default=100GB, min=50GB, max=32000GB)."
required: false
minimum: 50
maximum: 32000
multipleOf: 1
default: 100
visible:
and:
- add_iscsi_volume
boot_volume_backup_policy_enabled:
type: boolean
title: "Enable Boot Volume Backup Policy"
description: "Check the box if you want to add Boot Volume Backup Policy."
visible: true
default: true
boot_volume_backup_policy_level:
type: enum
required: false
title: "Boot Volume Backup Policy"
description: "Choose the value for Boot Volume Backup Policy."
default: "gold"
enum:
- "gold"
- "silver"
- "bronze"
visible:
and:
- boot_volume_backup_policy_enabled
boot_volume_initial_backup:
type: boolean
title: "Initial FULL backup of the Boot Volume"
description: "Check the box if you want to take initial FULL backup of the Boot Volume."
visible: true
default: true
block_volume_backup_policy_enabled:
type: boolean
title: "Enable iSCSI Block Volume Backup Policy"
description: "Check the box if you want to add iSCSI Block Volume Backup Policy."
visible:
and:
- add_iscsi_volume
default: true
block_volume_backup_policy_level:
type: enum
required: false
title: "iSCSI Block Volume Backup Policy"
description: "Choose the value for iSCSI Block Volume Backup Policy."
default: "gold"
enum:
- "gold"
- "silver"
- "bronze"
visible:
and:
- add_iscsi_volume
- block_volume_backup_policy_enabled
block_volume_initial_backup:
type: boolean
title: "Initial FULL backup of the iSCSI Block Volume"
description: "Check the box if you want to take initial FULL backup of the iSCSI Block Volume."
visible:
and:
- add_iscsi_volume
default: true
postgresql_vcn_cidr:
type: string
visible:
not:
- use_existing_vcn
required: false
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
title: "VCN CIDR"
description: "Choose VCN CIDR for your PostgreSQL deployments."
default: "10.1.0.0/16"
postgresql_subnet_cidr:
type: string
visible:
not:
- use_existing_vcn
required: false
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
title: "VCN CIDR"
description: "Choose Subnet CIDR for your PostgreSQL deployments."
default: "10.1.20.0/24"
create_drg_for_private_subnet:
type: boolean
visible:
not:
- use_existing_vcn
required: false
title: "Create DRG for Private Subnet scenario"
description: "Providing an option to create Dynamic Routing Gateway (DRG) for VCN and afterwards you can connect to your private subnet from on-premise."
default: false
postgresql_instance_shape:
type: oci:core:instanceshape:name
required: false
title: "Shape for PostgreSQL Master node"
description: "Choose shape for PostgreSQL Master node."
default: "VM.Standard.E4.Flex"
dependsOn:
compartmentId: ${compartment_ocid}
postgresql_instance_flex_shape_ocpus:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "Flex Shape OCPUs"
description: "Choose number of OCPUs for Flex Shape."
visible:
and:
- or:
- eq:
- postgresql_instance_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard3.Flex"
postgresql_instance_flex_shape_memory:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 10
title: "Flex Shape Memory (GB)"
description: "Choose number GB for Flex Shape Memory."
visible:
and:
- or:
- eq:
- postgresql_instance_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_instance_shape
- "VM.Standard3.Flex"
instance_os:
type: enum
required: false
title: "Instance OS"
description: "An Operating System that determines the operating system for the instance."
default: "Oracle Linux"
enum:
- "Oracle Linux"
linux_os_version:
type: enum
required: false
title: "Instance OS version"
description: "An Operating System version that determines the operating system version for the instance."
default: "8"
enum:
- "7.9"
- "8"
postgresql_master_fd:
type: enum
required: false
title: "PostgreSQL Master Fault Domain"
description: "Choose Fault Domain for PostgreSQL Master."
default: "1"
enum:
- "1"
- "2"
- "3"
postgresql_replicat_username:
type: string
required: false
title: "PostgreSQL Replicat Username"
description: "Type PostgreSQL Replicat Username"
# postgresql_hotstandby1_ad:
# type: oci:identity:availabilitydomain:name
# required: false
# title: "AD for the first PostgreSQL HotStandby"
# description: "Availability Domain for the first PostgreSQL HotStandby."
# dependsOn:
# compartmentId: ${compartment_ocid}
postgresql_hotstandby1_ad:
type: string
required: false
title: "AD number for the first PostgreSQL HotStandby"
description: "Availability Domain for the first PostgreSQL HotStandby."
dependsOn:
compartmentId: ${compartment_ocid}
postgresql_hotstandby1_fd:
type: enum
required: false
title: "The first PostgreSQL HotStandby's Fault Domain"
description: "Choose Fault Domain for the first PostgreSQL HotStandby."
default: "2"
enum:
- "1"
- "2"
- "3"
postgresql_hotstandby1_shape:
type: oci:core:instanceshape:name
required: false
title: "Shape for the first PostgreSQL HotStandby node"
description: "Choose shape for the first PostgreSQL HotStandby node."
default: "VM.Standard.E4.Flex"
dependsOn:
compartmentId: ${compartment_ocid}
postgresql_hotstandby1_flex_shape_ocpus:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "Flex Shape OCPUs"
description: "Choose number of OCPUs for Flex Shape."
visible:
and:
- or:
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard3.Flex"
postgresql_hotstandby1_flex_shape_memory:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 10
title: "Flex Shape Memory (GB)"
description: "Choose number GB for Flex Shape Memory."
visible:
and:
- or:
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_hotstandby1_shape
- "VM.Standard3.Flex"
# postgresql_hotstandby2_ad:
# type: oci:identity:availabilitydomain:name
# required: false
# title: "AD for the second PostgreSQL HotStandby"
# description: "Availability Domain for the second PostgreSQL HotStandby."
# dependsOn:
# compartmentId: ${compartment_ocid}
postgresql_hotstandby2_ad:
type: string
required: false
title: "AD number for the second PostgreSQL HotStandby"
description: "Availability Domain for the second PostgreSQL HotStandby."
dependsOn:
compartmentId: ${compartment_ocid}
postgresql_hotstandby2_fd:
type: enum
required: false
title: "The second PostgreSQL HotStandby's Fault Domain"
description: "Choose Fault Domain for the second PostgreSQL HotStandby."
default: "3"
enum:
- "1"
- "2"
- "3"
postgresql_hotstandby2_shape:
type: oci:core:instanceshape:name
required: false
title: "Shape for the second PostgreSQL HotStandby node"
description: "Choose shape for the second PostgreSQL HotStandby node."
default: "VM.Standard.E4.Flex"
dependsOn:
compartmentId: ${compartment_ocid}
postgresql_hotstandby2_flex_shape_ocpus:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "Flex Shape OCPUs"
description: "Choose number of OCPUs for Flex Shape."
visible:
and:
- or:
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard3.Flex"
postgresql_hotstandby2_flex_shape_memory:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 10
title: "Flex Shape Memory (GB)"
description: "Choose number GB for Flex Shape Memory."
visible:
and:
- or:
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.E3.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.E4.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard.A1.Flex"
- eq:
- postgresql_hotstandby2_shape
- "VM.Standard3.Flex"
use_existing_vcn:
type: boolean
title: "Use Existing VCN"
description: "Click to use existing VCN, otherwise VCN and Subnets will be created"
required: true
default: false
postgresql_vcn:
type: oci:core:vcn:id
title: "Existing VCN"
description: "Select Existing VCN"
dependsOn:
compartmentId: compartment_ocid
visible: use_existing_vcn
required: true
postgresql_subnet:
type: oci:core:subnet:id
title: "Postgresql_subnet"
description: "Select Subnet for Postgresql Instances and Bastion service"
dependsOn:
compartmentId: compartment_ocid
vcnId: postgresql_vcn
visible: use_existing_vcn
required: true
outputs:
generated_ssh_private_key:
title: "Generated SSH Private Key"
displayText: "Generated SSH Private Key"
type: copyableString
visible: true
PostgreSQL_Master_VM_public_IP:
title: "PostgreSQL Master VM public IP"
displayText: "PostgreSQL Master VM public IP"
type: string
visible: true
PostgreSQL_HotStandby1_VM_public_IP:
title: "PostgreSQL HotStandby1 VM public IP"
displayText: "PostgreSQL HotStandby1 VM public IP"
type: string
visible: true
PostgreSQL_HotStandby2_VM_public_IP:
title: "PostgreSQL HotStandby2 VM public IP"
displayText: "PostgreSQL HotStandby2 VM public IP"
type: string
visible: true
PostgreSQL_Username:
title: "PostgreSQL Username"
displayText: "PostgreSQL Username"
type: string
visible: true