-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgoogle-mysql.yml
283 lines (283 loc) · 10.3 KB
/
google-mysql.yml
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
# Copyright 2018 the Service Broker Project Authors.
#
# 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.
---
version: 1
name: csb-google-mysql
id: fe6a86d5-ce06-4c58-96f8-43aef1ac8a31
description: MySQL is a fully managed service for the Google Cloud Platform.
display_name: Google Cloud MySQL
image_url: file://service-images/csb.png
documentation_url: https://docs.vmware.com/en/Cloud-Service-Broker-for-VMware-Tanzu/index.html
provider_display_name: VMware
support_url: https://cloud.google.com/support/
tags: [gcp, mysql]
plan_updateable: true
plans: []
provision:
plan_inputs: []
user_inputs:
- field_name: tier
required: true
type: string
details: GCP DB machine type (see machine type information https://cloud.google.com/sql/docs/mysql/instance-settings)
constraints:
examples:
- db-n1-standard-2
- db-n1-standard-16
<<: &gcp_name_constraint
pattern: ^[a-z][a-z0-9-]+[a-z0-9]$
- field_name: mysql_version
required: true
type: string
details: The version for the MySQL instance. Can be any version supported by the provider.
- field_name: disk_autoresize
type: boolean
details: |
Enables auto-resizing of the storage size.
When disabling the storage auto-resizing, the value of the disk_autoresize_limit should also be set to 0.
default: true
- field_name: disk_autoresize_limit
type: number
details: |
The maximum size in GB to which storage capacity can be automatically increased.
The default value is 0, which specifies that there is no limit.
default: 0
- field_name: deletion_protection
type: boolean
details: |
Whether the DB instance should have deletion protection enabled.
The database can't be deleted when this value is set to `true`.
default: false
- field_name: storage_gb
type: number
details: |
Size of storage volume for service instance.
To change this value, set the `disk_autoresize` to false.
See documentation to understand the limits https://cloud.google.com/sql/docs/mysql/quotas#storage_limits
default: 10
constraints:
minimum: 10
- field_name: credentials
type: string
details: GCP credentials
default: ${config("gcp.credentials")}
- field_name: project
type: string
details: GCP project
default: ${config("gcp.project")}
- field_name: instance_name
type: string
details: Name for your mysql instance
default: csb-mysql-${request.instance_id}
constraints:
maxLength: 98
minLength: 6
<<: *gcp_name_constraint
prohibit_update: true
- field_name: db_name
type: string
details: Name for your database
default: csb-db
constraints:
maxLength: 64
prohibit_update: true
- field_name: region
type: string
details: The region of the mysql instance.
default: us-central1
prohibit_update: true
constraints:
examples:
- us-central1
- asia-northeast1
<<: *gcp_name_constraint
- field_name: authorized_network_id
type: string
details: The id of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used.
default: ""
prohibit_update: true
- field_name: authorized_networks_cidrs
type: array
details: CIDR notation IPv4 or IPv6 addresses that are allowed to access this instance.
default: []
- field_name: public_ip
type: boolean
details: Assigns a static public IPV4 IP to the database. Note - authorized_networks_cidrs must be configured on the selected network to enable external access.
default: false
- field_name: backups_start_time
type: string
details: Time indicating when the backup should start, in HH:MM format
default: "07:00"
- field_name: backups_location
type: string
details: The name of a specific region to store the backup. Defaults to multi-regional.
constraints:
default: null
nullable: true
<<: *gcp_name_constraint
- field_name: backups_retain_number
type: number
details: The number of backups to retain. Setting this value to 0 disables the backups
default: 7
constraints:
minimum: 0
- field_name: backups_transaction_log_retention_days
type: number
details: |
The number of days to retain the transaction logs. Setting this value to 0 disables transaction log backups.
The transaction logs can be retained up to 7 days. When transaction logs are enabled, regular backups are forced
to be enabled, even if `backups_retain_number` is set to 0.
default: 0
constraints:
minimum: 0
maximum: 7
- field_name: highly_available
type: boolean
details: |
Enable regional high availability for the service instance. This will result in a hot standby instance deployed
to a different zone in the same region, and will affect the billing accordingly. Requires transaction log backups
to be enabled. See https://cloud.google.com/sql/docs/mysql/high-availability for more details.
default: false
- field_name: location_preference_zone
type: string
details: |
Preferred zone in the instance region for the primary instance in a highly available setup. E.g. "a" or "c". When
not specified, one of the available zones will be chosen automatically. See
https://cloud.google.com/compute/docs/regions-zones#available for a list of available zones.
default: ""
constraints:
pattern: ^[a-z]?$
- field_name: location_preference_secondary_zone
type: string
details: |
Preferred zone in the instance region for the standby instance in a highly available setup. E.g. "b" or "f". In a
highly available configuration, when the secondary zone is not specified, a zone different from the one specified
for the primary instance will be chosen automatically. See
https://cloud.google.com/compute/docs/regions-zones#available for a list of available zones.
default: ""
constraints:
pattern: ^[a-z]?$
- field_name: allow_insecure_connections
type: boolean
details: Allow insecure connections between the application and this service instance
default: false
prohibit_update: true
computed_inputs:
- name: labels
default: ${json.marshal(request.default_labels)}
overwrite: true
type: object
template_refs:
provider: terraform/cloudsql/mysql/provision/provider.tf
versions: terraform/cloudsql/mysql/provision/versions.tf
main: terraform/cloudsql/mysql/provision/main.tf
data: terraform/cloudsql/mysql/provision/data.tf
variables: terraform/cloudsql/mysql/provision/variables.tf
outputs: terraform/cloudsql/mysql/provision/outputs.tf
outputs:
- field_name: name
type: string
details: The name of the database.
- field_name: private_ip
type: string
details: Private IP address of the MySQL endpoint used internally to manage bindings.
- field_name: hostname
type: string
details: The IP address of the exposed MySQL endpoint used by clients to connect to the service.
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: sslrootcert
type: string
details: Root CA for the database instance.
- field_name: sslcert
type: string
details: Client certificate for establishing a mutual TLS connection with the database instance.
- field_name: sslkey
type: string
details: Client private key for establishing a mutual TLS connection with the database instance.
- field_name: allow_insecure_connections
type: boolean
details: Allow insecure connections between the application and this service instance
bind:
plan_inputs: []
user_inputs: []
computed_inputs:
- name: mysql_db_name
type: string
default: ${instance.details["name"]}
overwrite: true
- name: mysql_hostname
type: string
default: ${instance.details["hostname"]}
overwrite: true
- name: private_ip
type: string
default: ${instance.details["private_ip"]}
overwrite: true
- name: admin_username
type: string
default: ${instance.details["username"]}
overwrite: true
- name: admin_password
type: string
default: ${instance.details["password"]}
overwrite: true
- name: sslrootcert
type: string
default: ${instance.details["sslrootcert"]}
- name: sslcert
type: string
default: ${instance.details["sslcert"]}
- name: sslkey
type: string
default: ${instance.details["sslkey"]}
- name: allow_insecure_connections
type: boolean
default: ${instance.details["allow_insecure_connections"]}
template_refs:
provider: terraform/cloudsql/mysql/bind/provider.tf
versions: terraform/cloudsql/mysql/bind/versions.tf
main: terraform/cloudsql/mysql/bind/main.tf
variables: terraform/cloudsql/mysql/bind/variables.tf
outputs: terraform/cloudsql/mysql/bind/outputs.tf
data: terraform/cloudsql/mysql/bind/data.tf
outputs:
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: uri
type: string
details: The uri to connect to the database instance and database.
- field_name: port
type: integer
details: The port number of the exposed mysql instance.
- field_name: jdbcUrl
type: string
details: The jdbc url to connect to the database instance and database.
- field_name: sslrootcert
type: string
details: Root CA for the database instance.
- field_name: sslcert
type: string
details: Client certificate for establishing a mutual TLS connection.
- field_name: sslkey
type: string
details: Client private key for establishing a mutual TLS connection.