-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgoogle-postgresql.yml
269 lines (269 loc) · 9.65 KB
/
google-postgresql.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
# 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-postgres
id: 40501b82-cb90-11ec-b1c2-e3a703778055
description: PostgreSQL is a fully managed service for the Google Cloud Platform.
display_name: Google Cloud PostgreSQL
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, postgresql, postgres]
plan_updateable: true
provision:
plan_inputs: []
user_inputs:
- field_name: tier
required: true
type: string
details: Google machine tier. This determines CPU and RAM resource. Please review the Google [documentation for machine tiers](https://cloud.google.com/sql/docs/postgres/create-instance#machine-types), to specify an appropriate machine.
- field_name: postgres_version
required: true
type: string
details: The version for the postgres instance.
default: "POSTGRES_13"
prohibit_update: true
constraints:
pattern: ^POSTGRES_[0-9]+$
- field_name: storage_gb
type: number
details: Size of storage volume for service instance. To change this value, set the `disk_autoresize` to false.
default: 10
constraints:
maximum: 4096
minimum: 10
- field_name: disk_autoresize
type: boolean
details: Enables auto-resizing of the storage size. When this is enabled the `storage_gb` value is ignored.
default: true
constraints:
maximum: 4096
minimum: 10
- field_name: disk_autoresize_limit
type: number
details: The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
default: 0
- field_name: require_ssl
type: boolean
details: Allow only connections with valid client certificate
default: true
- field_name: credentials
type: string
details: GCP credentials
default: ${config("gcp.credentials")}
- field_name: project
type: string
details: GCP project
default: ${config("gcp.project")}
prohibit_update: true
- field_name: instance_name
type: string
details: Name for your PostgreSQL instance
default: csb-postgres-${request.instance_id}
prohibit_update: true
- field_name: db_name
type: string
details: Name for your database
default: csb-db
prohibit_update: true
- field_name: region
type: string
details: The region of the postgres instance.
default: us-central1
prohibit_update: true
constraints:
examples:
- us-central1
- asia-northeast1
pattern: ^[a-z][a-z0-9-]+$
- field_name: authorized_network
type: string
details: The name of the Google Compute Engine network to which the instance is connected. If left unspecified, the network named 'default' will be used.
default: default
- field_name: authorized_network_id
type: string
details: The id of the Google Compute Engine network to which the instance is connected. Overrides the 'authorized_network' property.
default: ""
- 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 access.
default: false
- field_name: backups_retain_number
details: Number of backups to retain; setting to zero disables backups
type: integer
default: 7
constraints:
maximum: 1000
minimum: 0
- field_name: backups_location
details: Location where backups are stored
type: string
default: "us"
constraints:
examples:
- us-central1
- asia-northeast1
pattern: ^[a-z][a-z0-9-]+$
- field_name: backups_start_time
details: Start time of the backup window in UTC
type: string
default: "07:00"
constraints:
pattern: "^[0-2][0-9]:[0-5][0-9]$"
- field_name: backups_point_in_time_log_retain_days
details: Number of days to retain point in time logs; setting to zero disables point in time logging; backups must be enabled
type: integer
default: 7
constraints:
maximum: 7
minimum: 0
- 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 `backups_point_in_time_log_retain_days`
and `backups_retain_number` different than zero.
See https://cloud.google.com/sql/docs/postgres/high-availability.
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]?$
computed_inputs:
- name: labels
default: ${json.marshal(request.default_labels)}
overwrite: true
type: object
- name: database_version
default: ${postgres_version}
overwrite: true
type: string
template_refs:
provider: terraform/cloudsql/postgresql/provision/provider.tf
versions: terraform/cloudsql/postgresql/provision/versions.tf
main: terraform/cloudsql/postgresql/provision/main.tf
data: terraform/cloudsql/postgresql/provision/data.tf
variables: terraform/cloudsql/postgresql/provision/variables.tf
outputs: terraform/cloudsql/postgresql/provision/outputs.tf
outputs:
- field_name: name
type: string
details: The name of the database.
- field_name: hostname
type: string
details: Hostname or IP address of the exposed postgres 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: require_ssl
type: boolean
details: Using TLS for connection
- field_name: sslcert
type: string
details: The client CA Cert to authenticate with SQL instance
- field_name: sslkey
type: string
details: The client CA Cert to authenticate with SQL instance
- field_name: sslrootcert
type: string
details: The CA Certificate used to connect to the SQL instance via TLS
- field_name: private_ip
type: string
details: Private IP address of the mysql endpoint used internally to manage bindings
bind:
plan_inputs: []
user_inputs: []
computed_inputs:
- name: db_name
type: string
default: ${instance.details["name"]}
overwrite: true
- name: hostname
type: string
default: ${instance.details["hostname"]}
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: require_ssl
type: boolean
default: ${instance.details["require_ssl"]}
overwrite: true
- name: sslcert
type: string
default: ${instance.details["sslcert"]}
overwrite: true
- name: sslkey
type: string
default: ${instance.details["sslkey"]}
overwrite: true
- name: sslrootcert
type: string
default: ${instance.details["sslrootcert"]}
overwrite: true
- name: private_ip
type: string
default: ${instance.details["private_ip"]}
overwrite: true
template_refs:
provider: terraform/cloudsql/postgresql/bind/provider.tf
versions: terraform/cloudsql/postgresql/bind/versions.tf
main: terraform/cloudsql/postgresql/bind/main.tf
variables: terraform/cloudsql/postgresql/bind/variables.tf
outputs: terraform/cloudsql/postgresql/bind/outputs.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 postgres instance.
- field_name: jdbcUrl
type: string
details: The jdbc url to connect to the database instance and database.