-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
129 lines (108 loc) · 4.02 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
variable "client_name" {
description = "Name of client."
type = string
}
variable "environment" {
description = "Name of application's environnement."
type = string
}
variable "stack" {
description = "Name of application stack."
type = string
}
variable "resource_group_name" {
description = "Name of the application ressource group, herited from infra module."
type = string
}
variable "location" {
description = "Azure location."
type = string
}
variable "location_short" {
description = "Short string for Azure location."
type = string
}
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 "storage_mb" {
description = "Storage allowed for PostgresSQL Flexible server. Possible values : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server#storage_mb."
type = number
default = 32768
}
variable "postgresql_version" {
description = "Version of PostgreSQL Flexible Server. Possible values are : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server#version."
type = number
default = 13
}
variable "zone" {
description = "Specify availability-zone for PostgreSQL Flexible main Server."
type = number
default = 1
}
variable "standby_zone" {
description = "Specify availability-zone to enable high_availability and create standby PostgreSQL Flexible Server. (Null to disable high-availability)"
type = number
default = 2
}
variable "administrator_login" {
description = "PostgreSQL administrator login."
type = string
}
variable "administrator_password" {
description = "PostgreSQL administrator password. Strong Password : https://docs.microsoft.com/en-us/sql/relational-databases/security/strong-passwords?view=sql-server-2017."
type = string
}
variable "backup_retention_days" {
description = "Backup retention days for the PostgreSQL Flexible Server (Between 7 and 35 days)."
type = number
default = 7
}
variable "geo_redundant_backup_enabled" {
description = "Enable Geo Redundant Backup for the PostgreSQL Flexible Server."
type = bool
default = false
}
variable "maintenance_window" {
description = "Map of maintenance window configuration."
type = map(number)
default = null
}
variable "private_dns_zone_id" {
description = "ID of the private DNS zone to create the PostgreSQL Flexible Server."
type = string
default = null
}
variable "delegated_subnet_id" {
description = "Id of the subnet to create the PostgreSQL Flexible Server. (Should not have any resource deployed in)"
type = string
default = null
}
variable "databases" {
description = <<EOF
Map of databases configurations with database name as key and following available configuration option:
* (optional) charset: Valid PostgreSQL charset : https://www.postgresql.org/docs/current/multibyte.html#CHARSET-TABLE
* (optional) collation: Valid PostgreSQL collation : http://www.postgresql.cn/docs/13/collation.html - be careful about https://docs.microsoft.com/en-us/windows/win32/intl/locale-names?redirectedfrom=MSDN
EOF
type = map(object({
charset = optional(string, "UTF8")
collation = optional(string, "en_US.UTF8")
}))
default = {}
}
variable "postgresql_configurations" {
description = "PostgreSQL configurations to enable."
type = map(string)
default = {}
}
variable "allowed_cidrs" {
description = "Map of authorized cidrs."
type = map(string)
}