generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathvariables.tf
201 lines (158 loc) · 3.76 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
## 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
variable "tenancy_ocid" {}
variable "user_ocid" {
default = "dummy"
}
variable "fingerprint" {
default = "dummy"
}
variable "private_key_path" {
default = "/dummy"
}
variable "region" {}
variable "compartment_ocid" {}
variable "availability_domain_number" {}
variable "release" {
description = "Reference Architecture Release (OCI Architecture Center)"
default = "1.6.1"
}
variable "use_existing_vcn" {
default = false
}
variable "pg_whitelisted_ip" {
description = "Should be Public host IP Address like 89.64.91.8"
default = ""
}
variable "pg_whitelist_cidr" {
description = "Cidr block to be added in the firewall-cmd in trusted zone"
default = ""
}
variable "postgresql_vcn" {
default = ""
}
variable "postgresql_subnet" {
default = ""
}
variable "show_advanced" {
default = false
}
variable "create_in_private_subnet" {
default = true
}
variable "create_drg_for_private_subnet" {
default = false
}
variable "ssh_public_key" {
default = ""
}
variable "postgresql_vcn_cidr" {
default = "10.1.0.0/16"
}
variable "postgresql_subnet_cidr" {
default = "10.1.20.0/24"
}
variable "postgresql_instance_shape" {
default = "VM.Standard.E4.Flex"
}
variable "postgresql_instance_flex_shape_ocpus" {
default = 1
}
variable "postgresql_instance_flex_shape_memory" {
default = 10
}
variable "instance_os" {
description = "Operating system for compute instances"
default = "Oracle Linux"
}
variable "linux_os_version" {
description = "Operating system version for all Linux instances"
default = "8"
}
variable "postgresql_master_fd" {
default = "1"
}
variable "postgresql_replicat_username" {
default = "replicator"
}
variable "postgresql_password" {
default = ""
}
variable "postgresql_version" {
default = "13"
}
variable "add_iscsi_volume" {
default = true
}
variable "iscsi_volume_size_in_gbs" {
default = 100
}
variable "boot_volume_backup_policy_enabled" {
default = true
}
variable "boot_volume_backup_policy_level" {
default = "gold"
}
variable "boot_volume_initial_backup" {
default = true
}
variable "block_volume_backup_policy_enabled" {
default = true
}
variable "block_volume_backup_policy_level" {
default = "gold"
}
variable "block_volume_initial_backup" {
default = true
}
variable "postgresql_deploy_hotstandby1" {
default = false
}
variable "postgresql_hotstandby1_fd" {
default = "2"
}
variable "postgresql_hotstandby1_ad" {
default = ""
}
variable "postgresql_hotstandby1_shape" {
default = "VM.Standard.E4.Flex"
}
variable "postgresql_hotstandby1_flex_shape_ocpus" {
default = 1
}
variable "postgresql_hotstandby1_flex_shape_memory" {
default = 10
}
variable "postgresql_deploy_hotstandby2" {
default = false
}
variable "postgresql_hotstandby2_fd" {
default = "3"
}
variable "postgresql_hotstandby2_ad" {
default = ""
}
variable "postgresql_hotstandby2_shape" {
default = "VM.Standard.E4.Flex"
}
variable "postgresql_hotstandby2_flex_shape_ocpus" {
default = 1
}
variable "postgresql_hotstandby2_flex_shape_memory" {
default = 10
}
# Dictionary Locals
locals {
compute_flexible_shapes = [
"VM.Standard.E3.Flex",
"VM.Standard.E4.Flex",
"VM.Standard.A1.Flex",
"VM.Standard3.Flex"
]
}
# Checks if is using Flexible Compute Shapes
locals {
is_flexible_postgresql_instance_shape = contains(local.compute_flexible_shapes, var.postgresql_instance_shape)
is_flexible_postgresql_hotstandby1_shape = contains(local.compute_flexible_shapes, var.postgresql_hotstandby1_shape)
is_flexible_postgresql_hotstandby2_shape = contains(local.compute_flexible_shapes, var.postgresql_hotstandby2_shape)
}