forked from terraform-google-modules/terraform-google-sql-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
226 lines (194 loc) · 5.97 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
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "project_id" {
type = string
description = "The project ID to manage the Cloud SQL resources"
}
variable "name" {
type = string
description = "The name of the Cloud SQL resources"
}
variable "random_instance_name" {
type = bool
description = "Sets random suffix at the end of the Cloud SQL resource name"
default = false
}
// required
variable "database_version" {
description = "The database version to use: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, or SQLSERVER_2017_WEB"
type = string
default = "SQLSERVER_2017_STANDARD"
}
// required
variable "region" {
type = string
description = "The region of the Cloud SQL resources"
default = "us-central1"
}
variable "tier" {
description = "The tier for the master instance."
type = string
default = "db-custom-2-3840"
}
variable "zone" {
type = string
description = "The zone for the master instance."
default = "us-central1-a"
}
variable "activation_policy" {
description = "The activation policy for the master instance.Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`."
type = string
default = "ALWAYS"
}
variable "availability_type" {
description = "The availability type for the master instance.This is only used to set up high availability for the MSSQL instance. Can be either `ZONAL` or `REGIONAL`."
type = string
default = "ZONAL"
}
variable "disk_autoresize" {
description = "Configuration to increase storage size."
type = bool
default = true
}
variable "disk_size" {
description = "The disk size for the master instance."
default = 10
}
variable "disk_type" {
description = "The disk type for the master instance."
type = string
default = "PD_SSD"
}
variable "pricing_plan" {
description = "The pricing plan for the master instance."
type = string
default = "PER_USE"
}
variable "maintenance_window_day" {
description = "The day of week (1-7) for the master instance maintenance."
type = number
default = 1
}
variable "maintenance_window_hour" {
description = "The hour of day (0-23) maintenance window for the master instance maintenance."
type = number
default = 23
}
variable "maintenance_window_update_track" {
description = "The update track of maintenance window for the master instance maintenance.Can be either `canary` or `stable`."
type = string
default = "canary"
}
variable "database_flags" {
description = "The database flags for the master instance. See [more details](https://cloud.google.com/sql/docs/sqlserver/flags)"
type = list(object({
name = string
value = string
}))
default = []
}
variable "user_labels" {
description = "The key/value labels for the master instances."
type = map(string)
default = {}
}
variable "authorized_gae_applications" {
description = "The authorized gae applications for the Cloud SQL instances"
type = list(string)
default = []
}
variable "ip_configuration" {
description = "The ip configuration for the master instances."
type = object({
authorized_networks = list(map(string))
ipv4_enabled = bool
private_network = string
require_ssl = bool
})
default = {
authorized_networks = []
ipv4_enabled = true
private_network = null
require_ssl = null
}
}
variable "db_name" {
description = "The name of the default database to create"
type = string
default = "default"
}
variable "db_charset" {
description = "The charset for the default database"
type = string
default = ""
}
variable "db_collation" {
description = "The collation for the default database. Example: 'en_US.UTF8'"
type = string
default = ""
}
variable "additional_databases" {
description = "A list of databases to be created in your cluster"
type = list(object({
name = string
charset = string
collation = string
}))
default = []
}
variable "user_name" {
description = "The name of the default user"
type = string
default = "default"
}
variable "user_password" {
description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable."
type = string
default = ""
}
variable "additional_users" {
description = "A list of users to be created in your cluster"
type = list(object({
name = string
password = string
}))
default = []
}
variable "root_password" {
description = "MSSERVER password for the root user. If not set, a random one will be generated and available in the root_password output variable."
type = string
default = ""
}
variable "create_timeout" {
description = "The optional timout that is applied to limit long database creates."
type = string
default = "15m"
}
variable "update_timeout" {
description = "The optional timout that is applied to limit long database updates."
type = string
default = "15m"
}
variable "delete_timeout" {
description = "The optional timout that is applied to limit long database deletes."
type = string
default = "30m"
}
variable "module_depends_on" {
description = "List of modules or resources this module depends on."
type = list(any)
default = []
}