generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
380 lines (319 loc) · 11.5 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
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
#Module : LABEL
#Description : Terraform label module variables.
variable "name" {
type = string
default = ""
description = "Name (e.g. `app` or `cluster`)."
}
variable "server_custom_name" {
description = "User defined name for the PostgreSQL flexible server"
type = string
default = null
}
variable "environment" {
type = string
default = ""
description = "Environment (e.g. `prod`, `dev`, `staging`)."
}
variable "repository" {
type = string
default = ""
description = "Terraform current module repo"
}
variable "extra_tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
}
variable "label_order" {
type = list(any)
default = ["name", "environment"]
description = "Label order, e.g. sequence of application name and environment `name`,`environment`,'attribute' [`webserver`,`qa`,`devops`,`public`,] ."
}
variable "managedby" {
type = string
default = ""
description = "ManagedBy, eg ''."
}
variable "resource_group_name" {
type = string
default = ""
description = "A container that holds related resources for an Azure solution"
}
variable "enabled" {
type = bool
default = true
description = "Set to false to prevent the module from creating any resources."
}
variable "existing_private_dns_zone" {
type = bool
description = "Name of the existing private DNS zone"
default = false
}
variable "registration_enabled" {
type = bool
description = "Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled"
default = false
}
###########azurerm_postgresql_flexible_server######
variable "admin_username" {
type = string
default = null
description = "The administrator login name for the new SQL Server"
}
variable "admin_password_length" {
type = number
default = 16
description = "Length of random password generated."
}
variable "admin_password" {
type = string
description = "The password associated with the admin_username user"
default = null
}
variable "backup_retention_days" {
type = number
default = 7
description = "The backup retention days for the PostgreSQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7"
}
variable "delegated_subnet_id" {
type = string
default = null
description = "The resource ID of the subnet"
}
variable "allowed_cidrs" {
type = map(string)
default = {}
description = "Map of authorized cidrs to connect database"
}
variable "tier" {
description = "Tier for PostgreSQL Flexible server sku : https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-compute-storage. Possible values are: GeneralPurpose, Burstable, MemoryOptimized."
type = string
default = "GeneralPurpose"
}
variable "size" {
description = "Size for PostgreSQL Flexible server sku : https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-compute-storage."
type = string
default = "D2ds_v4"
}
variable "create_mode" {
type = string
description = "The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`"
default = "Default"
}
variable "geo_redundant_backup_enabled" {
type = bool
default = false
description = "Should geo redundant backup enabled? Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created."
}
variable "geo_backup_key_vault_key_id" {
type = string
default = null
description = "Key-vault key id to encrypt the geo redundant backup"
}
variable "geo_backup_user_assigned_identity_id" {
type = string
default = null
description = "User assigned identity id to encrypt the geo redundant backup"
}
variable "postgresql_version" {
type = string
default = "5.7"
description = "The version of the PostgreSQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new PostgreSQL Flexible Server to be created."
}
variable "zone" {
type = number
default = null
description = "Specifies the Availability Zone in which this PostgreSQL Flexible Server should be located. Possible values are 1, 2 and 3."
}
variable "point_in_time_restore_time_in_utc" {
type = string
default = null
description = " The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created."
}
variable "source_server_id" {
type = string
default = null
description = "The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new PostgreSQL Flexible Server to be created."
}
variable "virtual_network_id" {
type = string
description = "The name of the virtual network"
default = ""
}
variable "key_vault_id" {
type = string
default = ""
description = "Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret"
}
variable "private_dns" {
type = bool
default = false
}
variable "main_rg_name" {
type = string
default = ""
}
variable "location" {
type = string
default = ""
description = "The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created."
}
variable "existing_private_dns_zone_id" {
type = string
default = null
}
variable "existing_private_dns_zone_name" {
type = string
default = ""
description = " The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created."
}
variable "storage_mb" {
type = string
default = "32768"
description = "The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216."
}
variable "database_names" {
type = list(string)
default = ["maindb"]
description = "Specifies the name of the MySQL Database, which needs to be a valid MySQL identifier. Changing this forces a new resource to be created."
}
variable "charset" {
type = string
default = "utf8"
description = "Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created."
}
variable "collation" {
type = string
default = "en_US.utf8"
description = "Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Changing this forces a new resource to be created."
}
## Addon vritual link
variable "addon_vent_link" {
type = bool
default = false
description = "The name of the addon vnet "
}
variable "addon_resource_group_name" {
type = string
default = ""
description = "The name of the addon vnet resource group"
}
variable "addon_virtual_network_id" {
type = string
default = ""
description = "The name of the addon vnet link vnet id"
}
variable "high_availability" {
description = "Map of high availability configuration: https://docs.microsoft.com/en-us/azure/mysql/flexible-server/concepts-high-availability. `null` to disable high availability"
type = object({
standby_availability_zone = optional(number)
})
default = {
standby_availability_zone = 1
}
}
variable "enable_diagnostic" {
type = bool
default = true
description = "Flag to control creation of diagnostic settings."
}
variable "log_analytics_workspace_id" {
type = string
default = null
description = "Log Analytics workspace id in which logs should be retained."
}
variable "metric_enabled" {
type = bool
default = true
description = "Whether metric diagnonsis should be enable in diagnostic settings for flexible Mysql."
}
variable "log_category" {
type = list(string)
default = []
description = "Categories of logs to be recorded in diagnostic setting. Acceptable values are PostgreSQLFlexDatabaseXacts, PostgreSQLFlexQueryStoreRuntime, PostgreSQLFlexQueryStoreWaitStats ,PostgreSQLFlexSessions, PostgreSQLFlexTableStats, PostgreSQLLogs "
}
variable "log_category_group" {
type = list(string)
default = ["audit"]
description = " Log category group for diagnostic settings."
}
variable "log_analytics_destination_type" {
type = string
default = "AzureDiagnostics"
description = "Possible values are AzureDiagnostics and Dedicated, default to AzureDiagnostics. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table."
}
variable "storage_account_id" {
type = string
default = null
description = "Storage account id to pass it to destination details of diagnosys setting of NSG."
}
variable "eventhub_name" {
type = string
default = null
description = "Eventhub Name to pass it to destination details of diagnosys setting of NSG."
}
variable "eventhub_authorization_rule_id" {
type = string
default = null
description = "Eventhub authorization rule id to pass it to destination details of diagnosys setting of NSG."
}
variable "active_directory_auth_enabled" {
type = bool
default = true
description = "Set to true to enable Active Directory Authentication"
}
variable "principal_type" {
type = string
default = "Group"
description = "Set the principal type, defaults to ServicePrincipal. The type of Azure Active Directory principal. Possible values are Group, ServicePrincipal and User. Changing this forces a new resource to be created."
}
variable "principal_name" {
type = string
default = null
description = "The name of Azure Active Directory principal."
}
variable "maintenance_window" {
type = map(number)
default = null
description = "Map of maintenance window configuration: https://docs.microsoft.com/en-us/azure/mysql/flexible-server/concepts-maintenance"
}
variable "cmk_encryption_enabled" {
type = bool
default = false
description = "Enanle or Disable Database encryption with Customer Manage Key"
}
variable "admin_objects_ids" {
description = "IDs of the objects that can do all operations on all keys, secrets and certificates."
type = list(string)
default = []
}
variable "expiration_date" {
type = string
default = "2034-05-22T18:29:59Z"
description = "Expiration UTC datetime (Y-m-d'T'H:M:S'Z')"
}
variable "rotation_policy" {
type = map(object({
time_before_expiry = string
expire_after = string
notify_before_expiry = string
}))
default = null
description = "The rotation policy for azure key vault key"
}
variable "server_configurations" {
description = "PostgreSQL server configurations to add."
type = map(string)
default = {}
}
variable "ad_admin_objects_id" {
type = string
default = null
description = "azurerm postgresql flexible server active directory administrator's object id"
}
variable "public_network_access_enabled" {
type = bool
default = false
description = "Enable public network access for the PostgreSQL Flexible Server"
}